Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
keycloak-scim
Manage
Activity
Members
Labels
Plan
Issues
13
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
libre.sh
scim
keycloak-scim
Commits
a0958f72
Verified
Commit
a0958f72
authored
3 years ago
by
Hugo Renard
Browse files
Options
Downloads
Patches
Plain Diff
fix role mapping
parent
67084d69
No related branches found
No related tags found
No related merge requests found
Pipeline
#960
passed with stage
in 24 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/sh/libre/scim/core/UserAdapter.java
+8
-19
8 additions, 19 deletions
src/main/java/sh/libre/scim/core/UserAdapter.java
with
8 additions
and
19 deletions
src/main/java/sh/libre/scim/core/UserAdapter.java
+
8
−
19
View file @
a0958f72
...
@@ -100,26 +100,15 @@ public class UserAdapter extends Adapter<UserModel, UserResource> {
...
@@ -100,26 +100,15 @@ public class UserAdapter extends Adapter<UserModel, UserResource> {
user
.
getGroupsStream
().
flatMap
(
g
->
g
.
getRoleMappingsStream
())
user
.
getGroupsStream
().
flatMap
(
g
->
g
.
getRoleMappingsStream
())
.
filter
((
r
)
->
r
.
getFirstAttribute
(
"scim"
).
equals
(
"true"
)).
map
((
r
)
->
r
.
getName
())
.
filter
((
r
)
->
r
.
getFirstAttribute
(
"scim"
).
equals
(
"true"
)).
map
((
r
)
->
r
.
getName
())
.
forEach
(
r
->
rolesSet
.
add
(
r
));
.
forEach
(
r
->
rolesSet
.
add
(
r
));
// Bug when new user.
try
{
user
.
getRoleMappingsStream
().
filter
((
r
)
->
{
var
roleStream
=
user
.
getRoleMappingsStream
(
);
var
attr
=
r
.
getFirstAttribute
(
"scim"
);
if
(
rolesSet
==
null
)
{
if
(
attr
==
null
)
{
LOGGER
.
error
(
"role stream is null"
)
;
return
false
;
}
}
roleStream
.
filter
((
r
)
->
{
return
attr
.
equals
(
"true"
);
var
attr
=
r
.
getFirstAttribute
(
"scim"
);
}).
map
((
r
)
->
r
.
getName
()).
forEach
(
r
->
rolesSet
.
add
(
r
));
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
);
}
var
roles
=
new
String
[
rolesSet
.
size
()];
var
roles
=
new
String
[
rolesSet
.
size
()];
rolesSet
.
toArray
(
roles
);
rolesSet
.
toArray
(
roles
);
setRoles
(
roles
);
setRoles
(
roles
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment