Skip to content

Commit

Permalink
Merge Space Settings Review - Meeds-io/MIPs#147 (#1129)
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker authored Sep 26, 2024
2 parents c9dc9c9 + 9e32288 commit 5025488
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1846,8 +1846,7 @@ private void checkToRemoveDomainInUrl(Page note) {

private boolean canImportNotes(String authenticatedUser, Space space, Page page) throws WikiException {
if (space != null) {
return (spaceService.isSuperManager(authenticatedUser) || spaceService.isManager(space, authenticatedUser)
|| spaceService.isRedactor(space, authenticatedUser));
return (spaceService.canRedactOnSpace(space, authenticatedUser));
} else if (StringUtils.equals(page.getOwner(), IdentityConstants.SYSTEM)) {
return cmsService.hasAccessPermission(Utils.getIdentity(authenticatedUser), NotePageViewService.CMS_CONTENT_TYPE, page.getName());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,10 +739,7 @@ public static boolean canManageNotes(String authenticatedUser, Space space, Page
SpaceService spaceService = CommonsUtils.getService(SpaceService.class);
CMSService cmsService = CommonsUtils.getService(CMSService.class);
if (space != null) {
return (spaceService.isSuperManager(authenticatedUser)
|| spaceService.isManager(space, authenticatedUser)
|| spaceService.isRedactor(space, authenticatedUser)
|| spaceService.isMember(space, authenticatedUser) && ArrayUtils.isEmpty(space.getRedactors()));
return spaceService.canRedactOnSpace(space, authenticatedUser);
} else if (StringUtils.equals(page.getOwner(), IdentityConstants.SYSTEM)) {
return cmsService.hasEditPermission(getIdentity(authenticatedUser), NotePageViewService.CMS_CONTENT_TYPE, page.getName());
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,11 @@ public Space updateSpace(Space existingSpace) {
return null;
}

public Space updateSpaceAvatar(Space existingSpace) {
public Space updateSpaceAvatar(Space existingSpace, String username) {
return null;
}

public Space updateSpaceBanner(Space existingSpace) {
public Space updateSpaceBanner(Space existingSpace, String username) {
return null;
}

Expand Down Expand Up @@ -248,7 +248,7 @@ public void renameSpace(Space space, String newDisplayName) throws SpaceExceptio

}

public void renameSpace(String remoteId, Space space, String newDisplayName) throws SpaceException {
public void renameSpace(Space space, String newDisplayName, String remoteId) throws SpaceException {

}

Expand Down Expand Up @@ -468,14 +468,6 @@ public void unregisterSpaceLifeCycleListener(SpaceLifeCycleListener listener) {

}

public void setPortletsPrefsRequired(PortletPreferenceRequiredPlugin portletPrefsRequiredPlugin) {

}

public String[] getPortletsPrefsRequired() {
return null;
}

public ListAccess<Space> getVisitedSpaces(String remoteId, String appId) {
return null;
}
Expand Down

0 comments on commit 5025488

Please sign in to comment.