Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IA2
GMS
Commits
55432f71
Commit
55432f71
authored
Nov 25, 2020
by
Sonia Zorba
Browse files
Bugfix GroupStatusManager
parent
8d18a841
Pipeline
#681
passed with stages
in 31 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gms/src/main/java/it/inaf/ia2/gms/manager/GroupStatusManager.java
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
);
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment