Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
reg-app
Regapp
Commits
592e09bb
Commit
592e09bb
authored
Jul 21, 2021
by
michael.simon
Browse files
add primary as secondary group for oidc users
parent
307be019
Changes
1
Hide whitespace changes
Inline
Side-by-side
bwreg-service/src/main/java/edu/kit/scc/webreg/service/oidc/client/OidcGroupUpdater.java
View file @
592e09bb
...
...
@@ -17,7 +17,6 @@ import edu.kit.scc.webreg.dao.ServiceGroupFlagDao;
import
edu.kit.scc.webreg.dao.oidc.OidcGroupDao
;
import
edu.kit.scc.webreg.entity.EventType
;
import
edu.kit.scc.webreg.entity.GroupEntity
;
import
edu.kit.scc.webreg.entity.HomeOrgGroupEntity
;
import
edu.kit.scc.webreg.entity.ServiceBasedGroupEntity
;
import
edu.kit.scc.webreg.entity.ServiceGroupFlagEntity
;
import
edu.kit.scc.webreg.entity.ServiceGroupStatus
;
...
...
@@ -169,7 +168,19 @@ public class OidcGroupUpdater implements Serializable {
/**
* TODO implement secondary groups for OIDC
*
* if needed. Not sure, which attribute to take
*/
//String homeId = homeIdResolver.resolveHomeId(user, attributeMap);
/*
* Add Primary group to secondary as well
*/
if
(
user
.
getPrimaryGroup
()
!=
null
&&
(!
groupDao
.
isUserInGroup
(
user
,
user
.
getPrimaryGroup
())))
{
logger
.
debug
(
"Adding user {} to his primary group {} as secondary"
,
user
.
getEppn
(),
user
.
getPrimaryGroup
().
getName
());
groupDao
.
addUserToGroup
(
user
,
user
.
getPrimaryGroup
());
changedGroups
.
add
(
user
.
getPrimaryGroup
());
}
return
changedGroups
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment