mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
RM-1417 (User with no permissions to Hold container see "Freeze/Add to Hold" action)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@72256 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -209,12 +209,17 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
{
|
{
|
||||||
ParameterCheck.mandatory("filePlan", filePlan);
|
ParameterCheck.mandatory("filePlan", filePlan);
|
||||||
|
|
||||||
|
List<NodeRef> holds = new ArrayList<NodeRef>();
|
||||||
|
|
||||||
// get the root hold container
|
// get the root hold container
|
||||||
NodeRef holdContainer = filePlanService.getHoldContainer(filePlan);
|
NodeRef holdContainer = filePlanService.getHoldContainer(filePlan);
|
||||||
|
|
||||||
|
// If you remove the "All Records Management Roles" which means users do not have read permissions on hold container
|
||||||
|
// at all, the hold container will not be found for the logged in user. That's why we need to do a check here.
|
||||||
|
if (holdContainer != null)
|
||||||
|
{
|
||||||
// get the children of the root hold container
|
// get the children of the root hold container
|
||||||
List<ChildAssociationRef> holdsAssocs = nodeService.getChildAssocs(holdContainer, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
List<ChildAssociationRef> holdsAssocs = nodeService.getChildAssocs(holdContainer, ContentModel.ASSOC_CONTAINS, RegexQNamePattern.MATCH_ALL);
|
||||||
List<NodeRef> holds = new ArrayList<NodeRef>(holdsAssocs.size());
|
|
||||||
for (ChildAssociationRef holdAssoc : holdsAssocs)
|
for (ChildAssociationRef holdAssoc : holdsAssocs)
|
||||||
{
|
{
|
||||||
NodeRef hold = holdAssoc.getChildRef();
|
NodeRef hold = holdAssoc.getChildRef();
|
||||||
@@ -225,6 +230,7 @@ public class HoldServiceImpl extends ServiceBaseImpl
|
|||||||
holds.add(hold);
|
holds.add(hold);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return holds;
|
return holds;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user