AnsweredAssumed Answered

Override inherited permissions

Question asked by deepacp on Aug 10, 2015
Latest reply on Aug 12, 2015 by deepacp
Hi,

I would like to override the inherited permissions of a particular user and set a new permission. I use the following code to achieve this

    AuthenticationUtil.runAsSystem(new AuthenticationUtil.RunAsWork<Object>() {
        public Object doWork() throws Exception {
            permissionService.deletePermission(ref, loggedInUser, null);
            permissionService.setPermission(ref, loggedInUser, PermissionService.CONSUMER, true);
            return "";
        }
    });

However, I get this error when InheritPermissions is set on the folder - "Caught exception Can not delete from this acl in a node context SHARED".

Is there any way to override the parent's inherited permissions other than disabling it completely - only select permissions need to be overrided.

Thanks
Deepa

Outcomes