This commit is contained in:
Bill Burke 2013-10-16 17:16:47 -04:00
parent 168baa5de6
commit b4d71dce4d
10 changed files with 172 additions and 105 deletions

View file

@ -34,6 +34,14 @@ module.config([ '$routeProvider', function($routeProvider) {
} }
}, },
controller : 'RealmTokenDetailCtrl' controller : 'RealmTokenDetailCtrl'
}).when('/realms/:realm/social-settings', {
templateUrl : 'partials/realm-social.html',
resolve : {
realm : function(RealmLoader) {
return RealmLoader();
}
},
controller : 'RealmTokenDetailCtrl'
}) })
.when('/realms/:realm/required-credentials', { .when('/realms/:realm/required-credentials', {
templateUrl : 'partials/realm-credentials.html', templateUrl : 'partials/realm-credentials.html',

View file

@ -15,55 +15,72 @@
</ul> </ul>
</div> </div>
<div id="content"> <div id="content">
<h2 class="pull-left">Application Scope Mappings for <span>{{application.name}}</span></h2> <h2 class="pull-left"><span>{{application.name}}</span> Scope Mappings</h2>
<p class="subtitle"></p> <p class="subtitle"></p>
<form name="realmForm" novalidate> <form name="realmForm" novalidate>
<fieldset> <legend uncollapsed><span class="text">Realm Roles</span> </legend>
<legend uncollapsed><span class="text">Realm Scope</span> </legend> <fieldset class="border-top">
<div class="form-group"> <div class="form-group">
<div class="controls"> <div class="controls changing-selectors">
<select multiple size="5" <div class="select-title">
<label for="available">Available Roles</label>
<select id="available" class="form-control" multiple size="5"
ng-multiple="true" ng-multiple="true"
ng-model="selectedRealmRoles" ng-model="selectedRealmRoles"
ng-options="r.name for r in realmRoles"> ng-options="r.name for r in realmRoles">
</select> </select>
<button type="submit" ng-click="addRealmRole()">---&gt;</button> </div>
<button type="submit" ng-click="deleteRealmRole()">&lt;---</button> <div class="middle-buttons">
<select multiple size=5 <button type="submit" ng-click="addRealmRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteRealmRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="assigned">Assigned Roles</label>
<select id="assigned" class="form-control" multiple size=5
ng-multiple="true" ng-multiple="true"
ng-model="selectedRealmMappings" ng-model="selectedRealmMappings"
ng-options="r.name for r in realmMappings"> ng-options="r.name for r in realmMappings">
</select> </select>
</div> </div>
</div> </div>
</div>
</fieldset> </fieldset>
<fieldset ng-show="applications.length > 0"> <fieldset ng-show="applications.length > 0">
<legend collapsed><span class="text">Application Scope</span> </legend> <legend collapsed><span class="text">Application Roles</span> </legend>
<div class="form-group input-select"> <div class="form-group input-select">
<label for="applications">Application: </label> <label for="applications">Application: </label>
<div class="input-group"> <div class="input-group">
<div class="select-rcue"> <div class="select-rcue">
<select id="applications" name="applications" ng-change="changeApplication()" ng-model="targetApp" ng-options="a.name for a in applications"> <select id="applications" name="applications" ng-change="changeApplication()" ng-model="application" ng-options="a.name for a in applications">
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-show="application"> <div class="form-group">
<div class="controls"> <div class="controls changing-selectors">
<select multiple size="5" <div class="select-title">
<label for="app-available">Available Roles</label>
<select id="app-available" class="form-control" multiple size="5"
ng-multiple="true" ng-multiple="true"
ng-model="selectedApplicationRoles" ng-model="selectedApplicationRoles"
ng-options="r.name for r in applicationRoles"> ng-options="r.name for r in applicationRoles">
</select> </select>
<button type="submit" ng-click="addApplicationRole()">---&gt;</button> </div>
<button type="submit" ng-click="deleteApplicationRole()">&lt;---</button> <div class="middle-buttons">
<select multiple size=5 <button type="submit" ng-click="addApplicationRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteApplicationRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="app-assigned">Assigned Roles</label>
<select id="app-assigned" class="form-control" multiple size=5
ng-multiple="true" ng-multiple="true"
ng-model="selectedApplicationMappings" ng-model="selectedApplicationMappings"
ng-options="r.name for r in applicationMappings"> ng-options="r.name for r in applicationMappings">
</select> </select>
</div> </div>
</div> </div>
</div>
</fieldset> </fieldset>
</form> </form>
</div> </div>

View file

@ -4,11 +4,11 @@
<div id="content-area" class="col-md-9" role="main"> <div id="content-area" class="col-md-9" role="main">
<div class="top-nav" data-ng-hide="createRealm"> <div class="top-nav" data-ng-hide="createRealm">
<ul class="rcue-tabs"> <ul class="rcue-tabs">
<li><a href="#/realms/{{realm.id}}">Settings</a></li> <li><a href="#/realms/{{realm.id}}">General</a></li>
<li data-ng-show="realm.social"><a href="#">Social</a></li> <li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li> <li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
<li class="active"><a href="#/realms/{{realm.id}}/required-credentials">Required Credentials</a></li> <li class="active"><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
<li><a href="#/realms/{{realm.id}}/token-settings">Token Settings</a></li> <li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
</ul> </ul>
</div> </div>
<div id="content"> <div id="content">
@ -17,21 +17,21 @@
<form name="realmForm" novalidate> <form name="realmForm" novalidate>
<fieldset> <fieldset>
<legend uncollapsed><span class="text">Required Credentials</span></legend> <legend uncollapsed><span class="text">Required Credentials</span></legend>
<div class="form-group"> <div class="form-group clearfix block">
<label class="control-label">Required User Credentials</label> <label class="control-label">Required User Credentials</label>
<div class="controls"> <div class="controls">
<input style="width:250px" type="text" ui-select2="userCredentialOptions" ng-model="realm.requiredCredentials"> <input style="width:250px" type="text" ui-select2="userCredentialOptions" ng-model="realm.requiredCredentials">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group clearfix block">
<label class="control-label">Required Application Credentials</label> <label class="control-label">Required Application Credentials</label>
<div class="controls"> <div class="controls">
<input style="width:250;height:25" type="text" ui-select2="userCredentialOptions" ng-model="realm.requiredApplicationCredentials"> <input style="width:250;height:25" type="text" ui-select2="userCredentialOptions" ng-model="realm.requiredApplicationCredentials">
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group clearfix block">
<label class="control-label">Required OAuth Credentials</label> <label class="control-label">Required OAuth Credentials</label>
<div class="controls"> <div class="controls">

View file

@ -5,7 +5,7 @@
<div class="top-nav" data-ng-hide="createRealm"> <div class="top-nav" data-ng-hide="createRealm">
<ul class="rcue-tabs"> <ul class="rcue-tabs">
<li class="active"><a href="#/realms/{{realm.id}}">General</a></li> <li class="active"><a href="#/realms/{{realm.id}}">General</a></li>
<li data-ng-show="realm.social"><a href="#">Social</a></li> <li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li> <li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li> <li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li> <li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>

View file

@ -1,5 +1,5 @@
<ul data-ng-hide="createRealm"> <ul data-ng-hide="createRealm">
<li data-ng-class="(!path[2] || path[1] == 'role' || path[2] == 'roles' || path[2] == 'token-settings' || path[2] == 'required-credentials') && 'active'"><a href="#/realms/{{realm.id}}">Settings</a></li> <li data-ng-class="(!path[2] || path[1] == 'role' || path[2] == 'roles' || path[2] == 'token-settings' || path[2] == 'social-settings' || path[2] == 'required-credentials') && 'active'"><a href="#/realms/{{realm.id}}">Settings</a></li>
<li data-ng-class="(path[2] == 'users' || path[1] == 'user') && 'active'"><a href="#/realms/{{realm.id}}/users">Users</a> <li data-ng-class="(path[2] == 'users' || path[1] == 'user') && 'active'"><a href="#/realms/{{realm.id}}/users">Users</a>
</li> </li>
<li data-ng-class="(path[2] == 'applications' || path[1] == 'application') && 'active'"><a href="#/realms/{{realm.id}}/applications">Applications</a></li> <li data-ng-class="(path[2] == 'applications' || path[1] == 'application') && 'active'"><a href="#/realms/{{realm.id}}/applications">Applications</a></li>

View file

@ -0,0 +1,33 @@
<div id="wrapper" class="container">
<div class="row">
<div class="bs-sidebar col-md-3 clearfix" data-ng-include data-src="'partials/realm-menu.html'"></div>
<div id="content-area" class="col-md-9" role="main">
<div class="top-nav" data-ng-hide="createRealm">
<ul class="rcue-tabs">
<li><a href="#/realms/{{realm.id}}">General</a></li>
<li class="active" data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
<li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
<li><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
</ul>
</div>
<div id="content">
<h2 class="pull-left"><span>{{realm.realm}}</span> Social Providers</h2>
<p class="subtitle"></p>
<form name="realmForm" novalidate>
<fieldset>
<legend uncollapsed><span class="text">Social Settings</span></legend>
</fieldset>
<div class="form-actions">
<button type="submit" data-ng-click="save()" class="primary" data-ng-show="changed">Save
changes
</button>
<button type="submit" data-ng-click="reset()" data-ng-show="changed">Clear changes
</button>
</div>
</form>
</div>
</div>
<div id="container-right-bg"></div>
</div>
</div>

View file

@ -4,11 +4,11 @@
<div id="content-area" class="col-md-9" role="main"> <div id="content-area" class="col-md-9" role="main">
<div class="top-nav" data-ng-hide="createRealm"> <div class="top-nav" data-ng-hide="createRealm">
<ul class="rcue-tabs"> <ul class="rcue-tabs">
<li><a href="#/realms/{{realm.id}}">Settings</a></li> <li><a href="#/realms/{{realm.id}}">General</a></li>
<li data-ng-show="realm.social"><a href="#">Social</a></li> <li data-ng-show="realm.social"><a href="#/realms/{{realm.id}}/social-settings">Social</a></li>
<li><a href="#/realms/{{realm.id}}/roles">Roles</a></li> <li><a href="#/realms/{{realm.id}}/roles">Roles</a></li>
<li><a href="#/realms/{{realm.id}}/required-credentials">Required Credentials</a></li> <li><a href="#/realms/{{realm.id}}/required-credentials">Credentials</a></li>
<li class="active"><a href="#/realms/{{realm.id}}/token-settings">Token Settings</a></li> <li class="active"><a href="#/realms/{{realm.id}}/token-settings">Token</a></li>
</ul> </ul>
</div> </div>
<div id="content"> <div id="content">

View file

@ -19,6 +19,7 @@
<h2 class="pull-left"><span>{{user.username}}'s</span> Role Mappings</h2> <h2 class="pull-left"><span>{{user.username}}'s</span> Role Mappings</h2>
<p class="subtitle">All fields required</p> <p class="subtitle">All fields required</p>
<form name="realmForm" novalidate> <form name="realmForm" novalidate>
<legend uncollapsed><span class="text">Realm Roles</span> </legend>
<fieldset class="border-top"> <fieldset class="border-top">
<div class="form-group"> <div class="form-group">
<div class="controls changing-selectors"> <div class="controls changing-selectors">
@ -57,22 +58,30 @@
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-show="application"> <div class="form-group">
<div class="controls"> <div class="controls changing-selectors">
<select multiple size="5" <div class="select-title">
<label for="app-available">Available Roles</label>
<select id="app-available" class="form-control" multiple size="5"
ng-multiple="true" ng-multiple="true"
ng-model="selectedApplicationRoles" ng-model="selectedApplicationRoles"
ng-options="r.name for r in applicationRoles"> ng-options="r.name for r in applicationRoles">
</select> </select>
<button type="submit" ng-click="addApplicationRole()">---&gt;</button> </div>
<button type="submit" ng-click="deleteApplicationRole()">&lt;---</button> <div class="middle-buttons">
<select multiple size=5 <button type="submit" ng-click="addApplicationRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
<button type="submit" ng-click="deleteApplicationRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
</div>
<div class="select-title">
<label for="app-assigned">Assigned Roles</label>
<select id="app-assigned" class="form-control" multiple size=5
ng-multiple="true" ng-multiple="true"
ng-model="selectedApplicationMappings" ng-model="selectedApplicationMappings"
ng-options="r.name for r in applicationMappings"> ng-options="r.name for r in applicationMappings">
</select> </select>
</div> </div>
</div> </div>
</div>
</fieldset> </fieldset>
</form> </form>
</div> </div>

View file

@ -5,7 +5,7 @@ package org.keycloak.models;
* @version $Revision: 1 $ * @version $Revision: 1 $
*/ */
public interface Constants { public interface Constants {
String ADMIN_REALM = "Keycloak Adminstration"; String ADMIN_REALM = "Keycloak Administration";
String ADMIN_CONSOLE_APPLICATION = "Admin Console"; String ADMIN_CONSOLE_APPLICATION = "Admin Console";
String ADMIN_CONSOLE_ADMIN_ROLE = "admin"; String ADMIN_CONSOLE_ADMIN_ROLE = "admin";
String APPLICATION_ROLE = "KEYCLOAK_APPLICATION"; String APPLICATION_ROLE = "KEYCLOAK_APPLICATION";