fix bug when creating user
This commit is contained in:
parent
ce617daefd
commit
355e892525
1 changed files with 6 additions and 2 deletions
|
@ -100,8 +100,12 @@ public class UserAdapter extends Adapter<UserModel, UserResource> {
|
|||
user.getGroupsStream().flatMap(g -> g.getRoleMappingsStream())
|
||||
.filter((r) -> r.getFirstAttribute("scim").equals("true")).map((r) -> r.getName())
|
||||
.forEach(r -> rolesSet.add(r));
|
||||
user.getRoleMappingsStream().filter((r) -> r.getFirstAttribute("scim").equals("true"))
|
||||
.map((r) -> r.getName()).forEach(r -> rolesSet.add(r));
|
||||
// Bug when new user.
|
||||
try {
|
||||
user.getRoleMappingsStream().filter((r) -> r.getFirstAttribute("scim").equals("true"))
|
||||
.map((r) -> r.getName()).forEach(r -> rolesSet.add(r));
|
||||
} catch (Exception e) {
|
||||
}
|
||||
var roles = new String[rolesSet.size()];
|
||||
rolesSet.toArray(roles);
|
||||
setRoles(roles);
|
||||
|
|
Loading…
Reference in a new issue