create external role mappings
This commit is contained in:
parent
58b63b6ef0
commit
a3bce43d01
|
|
@ -39,6 +39,16 @@ if (!ldapManager.listLdapServerConfigurations().any { it.name == "dc.example.com
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// create external role mappings.
|
||||||
|
if (!security.securitySystem.listRoles().any { it.roleId == "Administrators" && it.source == "default" }) {
|
||||||
|
security.addRole(
|
||||||
|
"Administrators",
|
||||||
|
"nx-admin",
|
||||||
|
"Administrator Role (LDAP Administrators)",
|
||||||
|
[],
|
||||||
|
["nx-admin"])
|
||||||
|
}
|
||||||
|
|
||||||
ldapUsers = security.securitySystem.searchUsers(new UserSearchCriteria(source: 'LDAP'))
|
ldapUsers = security.securitySystem.searchUsers(new UserSearchCriteria(source: 'LDAP'))
|
||||||
return JsonOutput.toJson([
|
return JsonOutput.toJson([
|
||||||
ldapUsers: ldapUsers.sort { it.userId },
|
ldapUsers: ldapUsers.sort { it.userId },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue