mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
New implementation of doclibrary fine grained permissions dialog.
- Updated to Linton's new design and visuals - Removal of obsolete actions - SiteManager group permissions can no longer be modified - Removal of unnecessary and naughty runAs(systemuser) code patterns in Site permission modification code - Setting and Resetting of permissions now working correctly - Addition of missing permission checks to doclib actions (fixes issue with apparent ability of a Consumer user able to edit document meta-data - infact they could not, no permission check was performed before rendering the action and cached data was displayed when subsequently clicked) - Various other fixes and improvements to related webscripts. Addition of the SiteContributor role. Fix to missing json encoding in json.status.ftl Minor improvements to url encoder/decoder classes and removal of flush() call from RemoteClient that was not required but occasionally caused issues for Flash apps. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10579 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import java.util.Set;
|
||||
|
||||
import org.alfresco.service.cmr.security.AccessPermission;
|
||||
import org.alfresco.service.cmr.security.AccessStatus;
|
||||
import org.alfresco.service.cmr.security.PermissionService;
|
||||
|
||||
/**
|
||||
* Base class for Template API objects that support permissions.
|
||||
@@ -54,16 +55,19 @@ public abstract class BasePermissionsNode extends BaseContentNode implements Tem
|
||||
{
|
||||
String userName = this.services.getAuthenticationService().getCurrentUserName();
|
||||
this.permissions = new ArrayList<String>(4);
|
||||
Set<AccessPermission> acls = this.services.getPermissionService().getAllSetPermissions(getNodeRef());
|
||||
for (AccessPermission permission : acls)
|
||||
if (hasPermission(PermissionService.READ_PERMISSIONS))
|
||||
{
|
||||
StringBuilder buf = new StringBuilder(64);
|
||||
buf.append(permission.getAccessStatus())
|
||||
.append(';')
|
||||
.append(permission.getAuthority())
|
||||
.append(';')
|
||||
.append(permission.getPermission());
|
||||
this.permissions.add(buf.toString());
|
||||
Set<AccessPermission> acls = this.services.getPermissionService().getAllSetPermissions(getNodeRef());
|
||||
for (AccessPermission permission : acls)
|
||||
{
|
||||
StringBuilder buf = new StringBuilder(64);
|
||||
buf.append(permission.getAccessStatus())
|
||||
.append(';')
|
||||
.append(permission.getAuthority())
|
||||
.append(';')
|
||||
.append(permission.getPermission());
|
||||
this.permissions.add(buf.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
return this.permissions;
|
||||
|
Reference in New Issue
Block a user