RM-898: Manage Permissions are not being set on the File Plan

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@54805 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-09-03 00:23:04 +00:00
parent aa07a569d6
commit 3e8270eaf7
2 changed files with 28 additions and 4 deletions

View File

@@ -19,18 +19,27 @@
package org.alfresco.module.org_alfresco_module_rm.model.security;
/**
* Protected property implementation
*
* @author Roy Wetherall
* @since 2.1
*/
public class ProtectedProperty extends ProtectedModelArtifact
{
/** always allow new indicator */
private boolean allwaysAllowNew = false;
/**
* @param allwaysAllowNew true if always allow new, false otherwise
*/
public void setAllwaysAllowNew(boolean allwaysAllowNew)
{
this.allwaysAllowNew = allwaysAllowNew;
}
/**
* @return true if always allow new, false otherwise
*/
public boolean isAllwaysAllowNew()
{
return allwaysAllowNew;

View File

@@ -422,11 +422,26 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
private void setReadPermissionUp(NodeRef nodeRef, String authority)
{
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
if (parent != null &&
filePlanService.isFilePlan(parent) == false)
if (parent != null && filePlanService.isFilePlanComponent(parent) == true)
{
setPermissionImpl(parent, authority, RMPermissionModel.READ_RECORDS);
setReadPermissionUp(parent, authority);
setReadPermissionUpImpl(parent, authority);
}
}
/**
* Helper method used to set the read permission up the hierarchy
*
* @param nodeRef node reference
* @param authority authority
*/
private void setReadPermissionUpImpl(NodeRef nodeRef, String authority)
{
setPermissionImpl(nodeRef, authority, RMPermissionModel.READ_RECORDS);
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
if (parent != null && filePlanService.isFilePlanComponent(parent) == true)
{
setReadPermissionUpImpl(parent, authority);
}
}