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,53 +15,70 @@
</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">
ng-multiple="true" <label for="available">Available Roles</label>
ng-model="selectedRealmRoles" <select id="available" class="form-control" multiple size="5"
ng-options="r.name for r in realmRoles"> ng-multiple="true"
</select> ng-model="selectedRealmRoles"
<button type="submit" ng-click="addRealmRole()">---&gt;</button> ng-options="r.name for r in realmRoles">
<button type="submit" ng-click="deleteRealmRole()">&lt;---</button> </select>
<select multiple size=5 </div>
ng-multiple="true" <div class="middle-buttons">
ng-model="selectedRealmMappings" <button type="submit" ng-click="addRealmRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
ng-options="r.name for r in realmMappings"> <button type="submit" ng-click="deleteRealmRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
</select> </div>
</div> <div class="select-title">
</div> <label for="assigned">Assigned Roles</label>
</fieldset> <select id="assigned" class="form-control" multiple size=5
<fieldset ng-show="applications.length > 0"> ng-multiple="true"
<legend collapsed><span class="text">Application Scope</span> </legend> ng-model="selectedRealmMappings"
<div class="form-group input-select"> ng-options="r.name for r in realmMappings">
<label for="applications">Application: </label>
<div class="input-group">
<div class="select-rcue">
<select id="applications" name="applications" ng-change="changeApplication()" ng-model="targetApp" ng-options="a.name for a in applications">
</select> </select>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group" ng-show="application"> </fieldset>
<div class="controls">
<select multiple size="5" <fieldset ng-show="applications.length > 0">
ng-multiple="true" <legend collapsed><span class="text">Application Roles</span> </legend>
ng-model="selectedApplicationRoles" <div class="form-group input-select">
ng-options="r.name for r in applicationRoles"> <label for="applications">Application: </label>
</select> <div class="input-group">
<button type="submit" ng-click="addApplicationRole()">---&gt;</button> <div class="select-rcue">
<button type="submit" ng-click="deleteApplicationRole()">&lt;---</button> <select id="applications" name="applications" ng-change="changeApplication()" ng-model="application" ng-options="a.name for a in applications">
<select multiple size=5 </select>
ng-multiple="true" </div>
ng-model="selectedApplicationMappings" </div>
ng-options="r.name for r in applicationMappings"> </div>
</select> <div class="form-group">
<div class="controls changing-selectors">
<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-model="selectedApplicationRoles"
ng-options="r.name for r in applicationRoles">
</select>
</div>
<div class="middle-buttons">
<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-model="selectedApplicationMappings"
ng-options="r.name for r in applicationMappings">
</select>
</div>
</div> </div>
</div> </div>
</fieldset> </fieldset>

View file

@ -1,37 +1,37 @@
<div class="header rcue"> <div class="header rcue">
<div class="navbar utility"> <div class="navbar utility">
<div class="navbar-inner clearfix"> <div class="navbar-inner clearfix">
<h1><a href="#"><strong>Keycloak</strong> Central Login</a></h1> <h1><a href="#"><strong>Keycloak</strong> Central Login</a></h1>
<ul class="nav pull-right" data-ng-hide="auth.loggedIn"> <ul class="nav pull-right" data-ng-hide="auth.loggedIn">
<li><a href="/auth-server/rest/saas/login">Login</a></li> <li><a href="/auth-server/rest/saas/login">Login</a></li>
<li><a href="/auth-server/rest/saas/registrations">Register</a></li> <li><a href="/auth-server/rest/saas/registrations">Register</a></li>
</ul> </ul>
<ul class="nav pull-right" data-ng-show="auth.loggedIn"> <ul class="nav pull-right" data-ng-show="auth.loggedIn">
<li class="dropdown"> <li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">
<span class="icon-user">Icon: user</span>{{auth.user.displayName}}<i class="caret"></i></a> <span class="icon-user">Icon: user</span>{{auth.user.displayName}}<i class="caret"></i></a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="#">Manage Account</a></li> <li><a href="#">Manage Account</a></li>
<li class="separator"><a href="/auth-server/rest/saas/logout">Sign Out</a></li> <li class="separator"><a href="/auth-server/rest/saas/logout">Sign Out</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
<div class="navbar primary"> <div class="navbar primary">
<div class="navbar-inner clearfix" data-ng-controller="RealmDropdownCtrl"> <div class="navbar-inner clearfix" data-ng-controller="RealmDropdownCtrl">
<ul class="nav pull-left"> <ul class="nav pull-left">
<li> <li>
<span class="dropdown-label" data-ng-show="showNav()">Realm:</span> <span class="dropdown-label" data-ng-show="showNav()">Realm:</span>
<div class="dropdown" data-ng-show="showNav()"> <div class="dropdown" data-ng-show="showNav()">
<select ng-change="changeRealm()" ng-model="current.realm" ng-options="r.realm for r in current.realms"></select> <select ng-change="changeRealm()" ng-model="current.realm" ng-options="r.realm for r in current.realms"></select>
</div> </div>
</li> </li>
</ul> </ul>
<div class="pull-right" data-ng-show="auth.loggedIn"> <div class="pull-right" data-ng-show="auth.loggedIn">
<a class="button primary" href="#/create/realm" data-ng-class="path[0] == 'create' && path[1] == 'realm' && 'active'" <a class="button primary" href="#/create/realm" data-ng-class="path[0] == 'create' && path[1] == 'realm' && 'active'"
data-ng-show="auth.loggedIn">Add Realm</a> data-ng-show="auth.loggedIn">Add Realm</a>
</div> </div>
</div> </div>
</div> </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 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,20 +58,28 @@
</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">
ng-multiple="true" <label for="app-available">Available Roles</label>
ng-model="selectedApplicationRoles" <select id="app-available" class="form-control" multiple size="5"
ng-options="r.name for r in applicationRoles"> ng-multiple="true"
</select> ng-model="selectedApplicationRoles"
<button type="submit" ng-click="addApplicationRole()">---&gt;</button> ng-options="r.name for r in applicationRoles">
<button type="submit" ng-click="deleteApplicationRole()">&lt;---</button> </select>
<select multiple size=5 </div>
ng-multiple="true" <div class="middle-buttons">
ng-model="selectedApplicationMappings" <button type="submit" ng-click="addApplicationRole()" data-original-title="Move right" class="tooltipRightTrigger"><span class="icon-arrow-right">Move right</span></button>
ng-options="r.name for r in applicationMappings"> <button type="submit" ng-click="deleteApplicationRole()" data-original-title="Move left" class="tooltipRightTrigger"><span class="icon-arrow-left">Move left</span></button>
</select> </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-model="selectedApplicationMappings"
ng-options="r.name for r in applicationMappings">
</select>
</div>
</div> </div>
</div> </div>
</fieldset> </fieldset>

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";