Extended permission service unit test

+review RM-166



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/ROYTEST@110191 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2015-08-17 04:35:31 +00:00
parent 1613bba6e1
commit 08b43e39b0
2 changed files with 140 additions and 1 deletions

View File

@@ -153,7 +153,7 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl
}
// evaluate permission
result = super.hasPermission(nodeRef, perm);
result = hasPermissionImpl(nodeRef, perm);
// permission post-processors
List<PermissionPostProcessor> postProcessors = permissionProcessorRegistry.getPermissionPostProcessors();
@@ -165,6 +165,20 @@ public class ExtendedPermissionServiceImpl extends PermissionServiceImpl
return result;
}
/**
* Implementation of hasPermission method call.
* <p>
* Separation also convenient for unit testing.
*
* @param nodeRef node reference
* @param perm permission
* @return {@link AccessStatus} access status result
*/
protected AccessStatus hasPermissionImpl(NodeRef nodeRef, String perm)
{
return super.hasPermission(nodeRef, perm);
}
/**
* @see org.alfresco.repo.security.permissions.impl.PermissionServiceImpl#canRead(java.lang.Long)