mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
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:
@@ -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;
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user