commit
27b4f0e25d
4 changed files with 8 additions and 8 deletions
|
@ -562,9 +562,9 @@ public class ClientResource {
|
||||||
@NoCache
|
@NoCache
|
||||||
public ManagementPermissionReference setManagementPermissionsEnabled(ManagementPermissionReference ref) {
|
public ManagementPermissionReference setManagementPermissionsEnabled(ManagementPermissionReference ref) {
|
||||||
auth.clients().requireManage(client);
|
auth.clients().requireManage(client);
|
||||||
if (ref.isEnabled()) {
|
|
||||||
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
|
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
|
||||||
permissions.clients().setPermissionsEnabled(client, ref.isEnabled());
|
permissions.clients().setPermissionsEnabled(client, ref.isEnabled());
|
||||||
|
if (ref.isEnabled()) {
|
||||||
return toMgmtRef(client, permissions);
|
return toMgmtRef(client, permissions);
|
||||||
} else {
|
} else {
|
||||||
return new ManagementPermissionReference();
|
return new ManagementPermissionReference();
|
||||||
|
|
|
@ -263,9 +263,9 @@ public class GroupResource {
|
||||||
@NoCache
|
@NoCache
|
||||||
public ManagementPermissionReference setManagementPermissionsEnabled(ManagementPermissionReference ref) {
|
public ManagementPermissionReference setManagementPermissionsEnabled(ManagementPermissionReference ref) {
|
||||||
auth.groups().requireManage(group);
|
auth.groups().requireManage(group);
|
||||||
if (ref.isEnabled()) {
|
|
||||||
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
|
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
|
||||||
permissions.groups().setPermissionsEnabled(group, ref.isEnabled());
|
permissions.groups().setPermissionsEnabled(group, ref.isEnabled());
|
||||||
|
if (ref.isEnabled()) {
|
||||||
return toMgmtRef(group, permissions);
|
return toMgmtRef(group, permissions);
|
||||||
} else {
|
} else {
|
||||||
return new ManagementPermissionReference();
|
return new ManagementPermissionReference();
|
||||||
|
|
|
@ -364,9 +364,9 @@ public class RoleContainerResource extends RoleResource {
|
||||||
throw new NotFoundException("Could not find role");
|
throw new NotFoundException("Could not find role");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ref.isEnabled()) {
|
|
||||||
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
|
AdminPermissionManagement permissions = AdminPermissions.management(session, realm);
|
||||||
permissions.roles().setPermissionsEnabled(role, ref.isEnabled());
|
permissions.roles().setPermissionsEnabled(role, ref.isEnabled());
|
||||||
|
if (ref.isEnabled()) {
|
||||||
return RoleByIdResource.toMgmtRef(role, permissions);
|
return RoleByIdResource.toMgmtRef(role, permissions);
|
||||||
} else {
|
} else {
|
||||||
return new ManagementPermissionReference();
|
return new ManagementPermissionReference();
|
||||||
|
|
|
@ -50,7 +50,7 @@
|
||||||
<ul class="nav nav-pills nav-stacked">
|
<ul class="nav nav-pills nav-stacked">
|
||||||
<li data-ng-show="access.queryGroups" data-ng-class="(path[2] == 'groups'
|
<li data-ng-show="access.queryGroups" data-ng-class="(path[2] == 'groups'
|
||||||
|| path[2] == 'default-groups') && 'active'"><a href="#/realms/{{realm.realm}}/groups"><span class="pficon pficon-users"></span> {{:: 'groups' | translate}}</a></li>
|
|| path[2] == 'default-groups') && 'active'"><a href="#/realms/{{realm.realm}}/groups"><span class="pficon pficon-users"></span> {{:: 'groups' | translate}}</a></li>
|
||||||
<li data-ng-show="access.queryUsers" data-ng-class="(path[2] == 'users') && 'active'"><a href="#/realms/{{realm.realm}}/users"><span class="pficon pficon-user"></span> {{:: 'users' | translate}}</a></li>
|
<li data-ng-show="access.queryUsers" data-ng-class="(path[2] == 'users' || path[2] == 'users-permissions') && 'active'"><a href="#/realms/{{realm.realm}}/users"><span class="pficon pficon-user"></span> {{:: 'users' | translate}}</a></li>
|
||||||
<li data-ng-show="access.viewRealm" data-ng-class="(path[2] == 'sessions') && 'active'"><a href="#/realms/{{realm.realm}}/sessions/realm"><i class="fa fa-clock-o"></i> {{:: 'sessions' | translate}}</a></li>
|
<li data-ng-show="access.viewRealm" data-ng-class="(path[2] == 'sessions') && 'active'"><a href="#/realms/{{realm.realm}}/sessions/realm"><i class="fa fa-clock-o"></i> {{:: 'sessions' | translate}}</a></li>
|
||||||
<li data-ng-show="access.viewEvents" data-ng-class="(path[2] == 'events'
|
<li data-ng-show="access.viewEvents" data-ng-class="(path[2] == 'events'
|
||||||
|| path[2] == 'events-settings'
|
|| path[2] == 'events-settings'
|
||||||
|
|
Loading…
Reference in a new issue