Disable create new users from worker edition if user lacks ROLE_USER_ACCOUNTS
FEA: ItEr76S30PermissionsEnhancements
This commit is contained in:
parent
01446a0f6a
commit
0e6b5882f6
1 changed files with 6 additions and 0 deletions
|
|
@ -488,6 +488,12 @@ public class WorkerCRUDController extends GenericForwardComposer implements
|
|||
UserBindingOption[] values = UserBindingOption.values();
|
||||
for (UserBindingOption option : values) {
|
||||
Radio radio = new Radio(option.label);
|
||||
if (option.equals(UserBindingOption.CREATE_NEW_USER)
|
||||
&& !SecurityUtils
|
||||
.isSuperuserOrUserInRoles(UserRole.ROLE_USER_ACCOUNTS)) {
|
||||
radio.setDisabled(true);
|
||||
radio.setTooltiptext(_("You do not have permissions to create new users"));
|
||||
}
|
||||
userBindingRadiogroup.appendChild(radio);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue