Disallow to change roles and profiles in admin panel for LDAP users when roles are imported from LDAP
FEA: ItEr76S12LdapAuhentication
This commit is contained in:
parent
ecbe1351f5
commit
ad379e4ec7
4 changed files with 21 additions and 2 deletions
|
|
@ -127,4 +127,6 @@ public interface IUserModel {
|
|||
|
||||
boolean isLDAPBeingUsed();
|
||||
|
||||
boolean isLDAPRolesBeingUsed();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -228,4 +228,8 @@ public class UserCRUDController extends BaseCRUDController<User> implements
|
|||
return (isLdapUser() && userModel.isLDAPBeingUsed());
|
||||
}
|
||||
|
||||
public boolean getLdapUserRolesLdapConfiguration() {
|
||||
return (isLdapUser() && userModel.isLDAPRolesBeingUsed());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -248,4 +248,11 @@ public class UserModel implements IUserModel {
|
|||
.getLdapAuthEnabled();
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public boolean isLDAPRolesBeingUsed() {
|
||||
return configurationDAO.getConfiguration().getLdapConfiguration()
|
||||
.getLdapSaveRolesDB();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,10 +93,13 @@
|
|||
<!-- Associated UserRoles -->
|
||||
<groupbox closable="false">
|
||||
<caption label="${i18n:_('Association with roles')}" />
|
||||
<vbox>
|
||||
<label value="${i18n:_('Roles of LDAP users cannot be managed because LDAP roles are being used.')}" visible="@{controller.ldapUserRolesLdapConfiguration}" />
|
||||
</vbox>
|
||||
<hbox align="center">
|
||||
<combobox id="userRolesCombo" autodrop="true" />
|
||||
<button label="${i18n:_('Add role')}"
|
||||
onClick="controller.addSelectedRole()"/>
|
||||
onClick="controller.addSelectedRole()" disabled="@{controller.ldapUserRolesLdapConfiguration}"/>
|
||||
</hbox>
|
||||
<grid id="listing" model="@{controller.roles}">
|
||||
<columns sizable="true">
|
||||
|
|
@ -121,12 +124,15 @@
|
|||
<!-- Associated Profiles -->
|
||||
<groupbox closable="false">
|
||||
<caption label="${i18n:_('Association with profiles')}" />
|
||||
<vbox>
|
||||
<label value="${i18n:_('Profiles of LDAP users cannot be managed because LDAP roles are being used.')}" visible="@{controller.ldapUserRolesLdapConfiguration}" />
|
||||
</vbox>
|
||||
<hbox align="center">
|
||||
<autocomplete id="profileAutocomplete"
|
||||
autodrop="true" constraint=""
|
||||
finder="ProfileFinder" />
|
||||
<button label="${i18n:_('Add profile')}"
|
||||
onClick="controller.addSelectedProfile()" />
|
||||
onClick="controller.addSelectedProfile()" disabled="@{controller.ldapUserRolesLdapConfiguration}"/>
|
||||
</hbox>
|
||||
<grid id="profilesListing" model="@{controller.profiles}">
|
||||
<columns sizable="true">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue