Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RegApp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Janis Streib
RegApp
Commits
f865a98d
Commit
f865a98d
authored
8 months ago
by
Michael Simon
Browse files
Options
Downloads
Patches
Plain Diff
NO_STORY fill project groups with all user object from identities
parent
56655327
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
regapp-project/src/main/java/edu/kit/scc/webreg/service/project/AbstractProjectUpdater.java
+6
-20
6 additions, 20 deletions
...it/scc/webreg/service/project/AbstractProjectUpdater.java
with
6 additions
and
20 deletions
regapp-project/src/main/java/edu/kit/scc/webreg/service/project/AbstractProjectUpdater.java
+
6
−
20
View file @
f865a98d
...
...
@@ -16,8 +16,6 @@ import edu.kit.scc.webreg.dao.ServiceGroupFlagDao;
import
edu.kit.scc.webreg.dao.project.BaseProjectDao
;
import
edu.kit.scc.webreg.entity.EventType
;
import
edu.kit.scc.webreg.entity.GroupEntity
;
import
edu.kit.scc.webreg.entity.RegistryEntity
;
import
edu.kit.scc.webreg.entity.RegistryStatus
;
import
edu.kit.scc.webreg.entity.ServiceEntity
;
import
edu.kit.scc.webreg.entity.ServiceGroupFlagEntity
;
import
edu.kit.scc.webreg.entity.ServiceGroupStatus
;
...
...
@@ -208,24 +206,12 @@ public abstract class AbstractProjectUpdater<T extends ProjectEntity> implements
}
public
void
syncMemberToGroup
(
ProjectEntity
project
,
IdentityEntity
identity
,
String
executor
)
{
Set
<
ProjectServiceEntity
>
pseList
=
getDao
().
findServicesForProject
(
project
,
true
);
for
(
ProjectServiceEntity
pse
:
pseList
)
{
RegistryEntity
registry
=
registryDao
.
findByServiceAndIdentityAndStatus
(
pse
.
getService
(),
identity
,
RegistryStatus
.
ACTIVE
);
if
(
registry
==
null
)
{
registry
=
registryDao
.
findByServiceAndIdentityAndStatus
(
pse
.
getService
(),
identity
,
RegistryStatus
.
LOST_ACCESS
);
}
if
(
registry
!=
null
)
{
/*
* if user is registered for service, also add it to group member list
*/
if
(!
groupDao
.
isUserInGroup
(
registry
.
getUser
(),
project
.
getProjectGroup
()))
{
groupDao
.
addUserToGroup
(
registry
.
getUser
(),
project
.
getProjectGroup
());
}
for
(
UserEntity
user
:
identity
.
getUsers
())
{
/*
* add all users from identity to project group
*/
if
(!
groupDao
.
isUserInGroup
(
user
,
project
.
getProjectGroup
()))
{
groupDao
.
addUserToGroup
(
user
,
project
.
getProjectGroup
());
}
}
}
...
...
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