Skip to content

Commit

Permalink
Merge Space Settings Review - Meeds-io/MIPs#147 (#224)
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker authored Sep 26, 2024
2 parents e187793 + c8f299e commit 08326a3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ protected SearchScope getSearchScope(PortletRequest request) { // NOSONAR

Space space = SpaceUtils.getSpaceByContext();
if (space != null) {
if (getSpaceService().isSuperManager(userId) || getSpaceService().isMember(space, userId)) {
if (getSpaceService().canViewSpace(space, userId)) {
return cacheSearchScope(portletSession, SearchScope.SPACE);
} else {
return cacheSearchScope(portletSession, SearchScope.NONE);
Expand Down Expand Up @@ -256,7 +256,7 @@ protected boolean canModifySettings(PortletRequest request) {
}
Space space = SpaceUtils.getSpaceByContext();
if (space != null) {
boolean canModify = getSpaceService().isSuperManager(userId) || getSpaceService().isManager(space, userId);
boolean canModify = getSpaceService().canManageSpace(space, userId);
return cacheChartModificationAccessPermission(portletSession, canModify);
}
return cacheChartModificationAccessPermission(portletSession, false);
Expand Down

0 comments on commit 08326a3

Please sign in to comment.