Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
GMS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container 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
Show more breadcrumbs
IA2
GMS
Commits
55432f71
Commit
55432f71
authored
4 years ago
by
Sonia Zorba
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix GroupStatusManager
parent
8d18a841
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#681
passed
4 years ago
Stage: build
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gms/src/main/java/it/inaf/ia2/gms/manager/GroupStatusManager.java
+12
-10
12 additions, 10 deletions
...main/java/it/inaf/ia2/gms/manager/GroupStatusManager.java
with
12 additions
and
10 deletions
gms/src/main/java/it/inaf/ia2/gms/manager/GroupStatusManager.java
+
12
−
10
View file @
55432f71
...
...
@@ -46,7 +46,7 @@ public class GroupStatusManager extends UserAwareComponent {
Permission
groupPermission
=
permissionsManager
.
getCurrentUserPermission
(
parentGroup
);
if
(
Permission
.
includes
(
Permission
.
VIEW_MEMBERS
,
groupPermission
))
{
if
(
!
Permission
.
includes
(
groupPermission
,
Permission
.
VIEW_MEMBERS
))
{
throw
new
UnauthorizedException
(
"VIEW_MEMBERS permission is needed for performing this action"
);
}
...
...
@@ -82,16 +82,18 @@ public class GroupStatusManager extends UserAwareComponent {
for
(
int
i
=
0
;
i
<
groups
.
size
();
i
++)
{
GroupEntity
group
=
groups
.
get
(
i
);
String
groupName
=
names
.
get
(
group
.
getId
());
List
<
String
>
users
=
membersMap
.
get
(
group
.
getId
());
if
(
users
!=
null
)
{
for
(
String
userId
:
users
)
{
String
email
=
usersMap
.
get
(
userId
);
if
(
email
==
null
)
{
LOG
.
warn
(
"Unable to retrieve information about user "
+
userId
);
continue
;
if
(
groupName
!=
null
)
{
List
<
String
>
users
=
membersMap
.
get
(
group
.
getId
());
if
(
users
!=
null
)
{
for
(
String
userId
:
users
)
{
String
email
=
usersMap
.
get
(
userId
);
if
(
email
==
null
)
{
LOG
.
warn
(
"Unable to retrieve information about user "
+
userId
);
continue
;
}
String
[]
row
=
new
String
[]{
groupName
,
email
};
rows
.
add
(
row
);
}
String
[]
row
=
new
String
[]{
groupName
,
email
};
rows
.
add
(
row
);
}
}
}
...
...
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