mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for ALF-200: Deprecated methods should have reference to alternative methods
- removed PermissoinService methods deprecated since 2.2/3.0 git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19907 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1833,56 +1833,6 @@ public class PermissionServiceImpl extends AbstractLifecycleBean implements Perm
|
||||
return value;
|
||||
}
|
||||
}
|
||||
|
||||
public Map<NodeRef, Set<AccessPermission>> getAllSetPermissionsForCurrentUser()
|
||||
{
|
||||
String currentUser = AuthenticationUtil.getRunAsUser();
|
||||
return getAllSetPermissionsForAuthority(currentUser);
|
||||
}
|
||||
|
||||
public Map<NodeRef, Set<AccessPermission>> getAllSetPermissionsForAuthority(String authority)
|
||||
{
|
||||
return permissionsDaoComponent.getAllSetPermissions(authority);
|
||||
}
|
||||
|
||||
public Set<NodeRef> findNodesByAssignedPermissionForCurrentUser(String permission, boolean allow, boolean includeContainingAuthorities, boolean exactPermissionMatch)
|
||||
{
|
||||
String currentUser = AuthenticationUtil.getRunAsUser();
|
||||
return findNodesByAssignedPermission(currentUser, permission, allow, includeContainingAuthorities, exactPermissionMatch);
|
||||
}
|
||||
|
||||
public Set<NodeRef> findNodesByAssignedPermission(String authority, String permission, boolean allow, boolean includeContainingAuthorities, boolean includeContainingPermissions)
|
||||
{
|
||||
// TODO: owned nodes and add owner rights ??
|
||||
// Does not include dynamic permissions (they would have to be done by query - e.g. owership and OWNER rights)
|
||||
// Does not include ACEGI auth object authorities
|
||||
Set<String> authorities = new HashSet<String>();
|
||||
authorities.add(authority);
|
||||
if (includeContainingAuthorities)
|
||||
{
|
||||
authorities.addAll(authorityService.getAuthoritiesForUser(authority));
|
||||
}
|
||||
|
||||
HashSet<NodeRef> answer = new HashSet<NodeRef>();
|
||||
|
||||
PermissionReference pr = getPermissionReference(permission);
|
||||
Set<PermissionReference> permissions = new HashSet<PermissionReference>();
|
||||
permissions.add(pr);
|
||||
|
||||
if (includeContainingPermissions)
|
||||
{
|
||||
permissions.addAll(modelDAO.getGrantingPermissions(pr));
|
||||
}
|
||||
|
||||
for (PermissionReference perm : permissions)
|
||||
{
|
||||
for (String auth : authorities)
|
||||
{
|
||||
answer.addAll(permissionsDaoComponent.findNodeByPermission(auth, perm, allow));
|
||||
}
|
||||
}
|
||||
return answer;
|
||||
}
|
||||
|
||||
/**
|
||||
* This methods checks whether the specified nodeRef instance is a version nodeRef (ie. in the 'version' store)
|
||||
|
@@ -107,26 +107,6 @@ public interface PermissionsDaoComponent
|
||||
*/
|
||||
public boolean getInheritParentPermissions(NodeRef nodeRef);
|
||||
|
||||
/**
|
||||
* Get all the permissions set for the given authority
|
||||
*
|
||||
* @return - the permissions set on all nodes for the given authority.
|
||||
*/
|
||||
public Map<NodeRef, Set<AccessPermission>> getAllSetPermissions(String authority);
|
||||
|
||||
/**
|
||||
* Find nodes which have the given permisson for the given authority
|
||||
*
|
||||
* @param authority -
|
||||
* the authority to match
|
||||
* @param permission -
|
||||
* the permission to match
|
||||
* @param allow -
|
||||
* true to match allow, false to match deny
|
||||
* @return - the set of matching nodes
|
||||
*/
|
||||
public Set<NodeRef> findNodeByPermission(String authority, PermissionReference permission, boolean allow);
|
||||
|
||||
/**
|
||||
* Delete entries from a permission mask on a store by authority
|
||||
*/
|
||||
|
Reference in New Issue
Block a user