04-22-2009 10:58 AM
boolean result = permissionService.hasPermission(nodeRef, permString);
Unfortunately, this is going in an endless loop, since the code is part of a dynamic authority and hasPermission adds dynamical authorities as well…
05-05-2009 06:58 AM
NodePermissionEntry nodePermissions = permissionsDaoComponent.getPermissions(nodeRef);
List<? extends PermissionEntry> permEntries = nodePermissions.getPermissionEntries();
Set<String> auths = authorityService.getAuthorities();
auths.add(userName);
for (PermissionEntry permEntry : permEntries) {
if (permEntry.getPermissionReference().equals(basePermission) &&
auths.contains(permEntry.getAuthority()) &&
permEntry.getAccessStatus() == AccessStatus.ALLOWED) {
return AccessStatus.ALLOWED;
}
}
11-14-2009 12:02 PM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.