mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged 5.2.N (5.2.2) to HEAD (5.2)
134403 mward: Merged mward/5.2.n-repo-1583-groupmem (5.2.1) to 5.2.N (5.2.1) 134397 mward: REPO-1583: implementing feedback from CR-667 review git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@137345 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -51,6 +51,7 @@ import org.alfresco.rest.workflow.api.impl.MapBasedQueryWalkerOrSupported;
|
||||
import org.alfresco.service.cmr.security.AuthorityService;
|
||||
import org.alfresco.service.cmr.security.AuthorityType;
|
||||
import org.alfresco.util.AlfrescoCollator;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
@@ -205,7 +206,7 @@ public class GroupsImpl implements Groups
|
||||
String currentUserId = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
if (!isAdmin && !currentUserId.equalsIgnoreCase(personId))
|
||||
{
|
||||
// The user is not an admin user and is not attempting to update *their own* details.
|
||||
// The user is not an admin user and is not attempting to retrieve *their own* details.
|
||||
throw new PermissionDeniedException();
|
||||
}
|
||||
|
||||
@@ -349,8 +350,8 @@ public class GroupsImpl implements Groups
|
||||
throw new InvalidArgumentException("id is null or empty");
|
||||
}
|
||||
|
||||
// authorityService.authorityExists("GROUP_EVERYONE") returns false!
|
||||
if (!id.equals("GROUP_EVERYONE") && !authorityService.authorityExists(id))
|
||||
// authorityService.authorityExists(ALL_AUTHORITIES) returns false!
|
||||
if (!id.equals(PermissionService.ALL_AUTHORITIES) && !authorityService.authorityExists(id))
|
||||
{
|
||||
throw new EntityNotFoundException(id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user