mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +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;
|
package org.alfresco.module.org_alfresco_module_rm.model.security;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* Protected property implementation
|
||||||
|
*
|
||||||
* @author Roy Wetherall
|
* @author Roy Wetherall
|
||||||
* @since 2.1
|
* @since 2.1
|
||||||
*/
|
*/
|
||||||
public class ProtectedProperty extends ProtectedModelArtifact
|
public class ProtectedProperty extends ProtectedModelArtifact
|
||||||
{
|
{
|
||||||
|
/** always allow new indicator */
|
||||||
private boolean allwaysAllowNew = false;
|
private boolean allwaysAllowNew = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param allwaysAllowNew true if always allow new, false otherwise
|
||||||
|
*/
|
||||||
public void setAllwaysAllowNew(boolean allwaysAllowNew)
|
public void setAllwaysAllowNew(boolean allwaysAllowNew)
|
||||||
{
|
{
|
||||||
this.allwaysAllowNew = allwaysAllowNew;
|
this.allwaysAllowNew = allwaysAllowNew;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return true if always allow new, false otherwise
|
||||||
|
*/
|
||||||
public boolean isAllwaysAllowNew()
|
public boolean isAllwaysAllowNew()
|
||||||
{
|
{
|
||||||
return allwaysAllowNew;
|
return allwaysAllowNew;
|
||||||
|
@@ -422,11 +422,26 @@ public class FilePlanPermissionServiceImpl implements FilePlanPermissionService,
|
|||||||
private void setReadPermissionUp(NodeRef nodeRef, String authority)
|
private void setReadPermissionUp(NodeRef nodeRef, String authority)
|
||||||
{
|
{
|
||||||
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
|
NodeRef parent = nodeService.getPrimaryParent(nodeRef).getParentRef();
|
||||||
if (parent != null &&
|
if (parent != null && filePlanService.isFilePlanComponent(parent) == true)
|
||||||
filePlanService.isFilePlan(parent) == false)
|
|
||||||
{
|
{
|
||||||
setPermissionImpl(parent, authority, RMPermissionModel.READ_RECORDS);
|
setReadPermissionUpImpl(parent, authority);
|
||||||
setReadPermissionUp(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