debug commit
This commit is contained in:
parent
96a2ac44fc
commit
67084d699a
1 changed files with 15 additions and 2 deletions
|
@ -102,8 +102,21 @@ public class UserAdapter extends Adapter<UserModel, UserResource> {
|
|||
.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));
|
||||
var roleStream = user.getRoleMappingsStream();
|
||||
if (rolesSet == null) {
|
||||
LOGGER.error("role stream is null");
|
||||
}
|
||||
roleStream.filter((r) -> {
|
||||
var attr = r.getFirstAttribute("scim");
|
||||
if (attr == null) {
|
||||
LOGGER.debug("attribute is null");
|
||||
return false;
|
||||
}
|
||||
return attr.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));
|
||||
} catch (Exception e) {
|
||||
LOGGER.error(e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue