RM: Fix up hide action after changes to extended security service.

* hide now shows only for collab users that have extended write on the record, ie fileRecord capability and filling permission



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@46334 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Roy Wetherall
2013-02-07 06:56:42 +00:00
parent b0110b7c76
commit 13417e16a1
3 changed files with 50 additions and 10 deletions

View File

@@ -475,16 +475,6 @@ public class RecordServiceImpl implements RecordService,
{
ParameterCheck.mandatory("NodeRef", nodeRef);
// first we do a sanity check to ensure that the user has at least write permissions on the record
if (permissionService.hasPermission(nodeRef, PermissionService.WRITE) != AccessStatus.ALLOWED)
{
throw new AccessDeniedException(
"Cannot hide record, because the user '"
+ AuthenticationUtil.getRunAsUser()
+ "' does not have write permissions on the record '"
+ nodeRef.toString() + "'.");
}
// do the work of hiding the record as the system user
AuthenticationUtil.runAsSystem(new RunAsWork<Void>()
{