@Override public PermissionService getPermissionService() { return serviceRegistry.getPermissionService(); } }
@Override public PermissionService getPermissionService() { return serviceRegistry.getPermissionService(); } }
/** * Set whether this node should inherit permissions from the parent node. * * @param inherit True to inherit parent permissions, false otherwise. */ public void setInheritsPermissions(boolean inherit) { this.services.getPermissionService().setInheritParentPermissions(this.nodeRef, inherit); }
/** * @return true if the node inherits permissions from the parent node, false otherwise */ public boolean inheritsPermissions() { return this.services.getPermissionService().getInheritParentPermissions(this.nodeRef); }
/** * @return true if the node inherits permissions from the parent node, false otherwise */ public boolean inheritsPermissions() { return this.services.getPermissionService().getInheritParentPermissions(this.nodeRef); }
/** * Set whether this node should inherit permissions from the parent node. If the operation takes * too long and asyncCall parameter set accordingly, fixed ACLs method will be asynchronously called. * * @param inherit True to inherit parent permissions, false otherwise. * @param asyncCall True if fixed ACLs should be asynchronously set when operation execution takes too long, false otherwise. */ public void setInheritsPermissions(boolean inherit, boolean asyncCall) { this.services.getPermissionService().setInheritParentPermissions(this.nodeRef, inherit, asyncCall); }
/** * Remove a permission for ALL user from the node. * * @param permission Permission to remove @see org.alfresco.service.cmr.security.PermissionService */ public void removePermission(String permission) { ParameterCheck.mandatoryString("Permission Name", permission); this.services.getPermissionService().deletePermission( this.nodeRef, PermissionService.ALL_AUTHORITIES, permission); }
/** * @param permission Permission name to test * * @return true if the current user is granted the specified permission on the node */ public boolean hasPermission(String permission) { return (this.services.getPermissionService().hasPermission(getNodeRef(), permission) == AccessStatus.ALLOWED); } }
/** * @return true if this node inherits permissions from its parent node, false otherwise. */ public boolean getInheritsPermissions() { return this.services.getPermissionService().getInheritParentPermissions(getNodeRef()); }
/** * Remove a permission for ALL user from the node. * * @param permission Permission to remove @see org.alfresco.service.cmr.security.PermissionService */ public void removePermission(String permission) { ParameterCheck.mandatoryString("Permission Name", permission); this.services.getPermissionService().deletePermission( this.nodeRef, PermissionService.ALL_AUTHORITIES, permission); }
/** * @return Display path to this node */ public String getDisplayPath() { if (this.displayPath == null) { this.displayPath = this.nodeService.getPath(this.nodeRef).toDisplayPath( this.nodeService, this.services.getPermissionService()); } return this.displayPath; }
/** * Apply a permission for ALL users to the node. * * @param permission Permission to apply * @see org.alfresco.service.cmr.security.PermissionService */ public void setPermission(String permission) { ParameterCheck.mandatoryString("Permission Name", permission); this.services.getPermissionService().setPermission( this.nodeRef, PermissionService.ALL_AUTHORITIES, permission, true); }
/** * Apply a permission for ALL users to the node. * * @param permission Permission to apply * @see org.alfresco.service.cmr.security.PermissionService */ public void setPermission(String permission) { ParameterCheck.mandatoryString("Permission Name", permission); this.services.getPermissionService().setPermission( this.nodeRef, PermissionService.ALL_AUTHORITIES, permission, true); }
/** * @return Array of settable permissions for this Node */ public Scriptable getSettablePermissions() { Set<String> permissions = this.services.getPermissionService().getSettablePermissions(getNodeRef()); Object[] result = permissions.toArray(new Object[0]); return Context.getCurrentContext().newArray(this.scope, result); }
/** * Remove a permission for the specified authority (e.g. username or group) from the node. * * @param permission Permission to remove @see org.alfresco.service.cmr.security.PermissionService * @param authority Authority (generally a username or group name) to apply the permission for */ public void removePermission(String permission, String authority) { ParameterCheck.mandatoryString("Permission Name", permission); ParameterCheck.mandatoryString("Authority", authority); this.services.getPermissionService().deletePermission( this.nodeRef, authority, permission); }
/** * @return Array of settable permissions for this Node */ public Scriptable getSettablePermissions() { Set<String> permissions = this.services.getPermissionService().getSettablePermissions(getNodeRef()); Object[] result = permissions.toArray(new Object[0]); return Context.getCurrentContext().newArray(this.scope, result); }
/** * Apply a permission for the specified authority (e.g. username or group) to the node. * * @param permission Permission to apply @see org.alfresco.service.cmr.security.PermissionService * @param authority Authority (generally a username or group name) to apply the permission for */ public void setPermission(String permission, String authority) { ParameterCheck.mandatoryString("Permission Name", permission); ParameterCheck.mandatoryString("Authority", authority); this.services.getPermissionService().setPermission( this.nodeRef, authority, permission, true); }
/** * Apply a permission for the specified authority (e.g. username or group) to the node. * * @param permission Permission to apply @see org.alfresco.service.cmr.security.PermissionService * @param authority Authority (generally a username or group name) to apply the permission for */ public void setPermission(String permission, String authority) { ParameterCheck.mandatoryString("Permission Name", permission); ParameterCheck.mandatoryString("Authority", authority); this.services.getPermissionService().setPermission( this.nodeRef, authority, permission, true); }
/** * @return Display path to this node - the path built of 'cm:name' attribute values. */ public String getDisplayPath() { if (displayPath == null) { displayPath = this.services.getNodeService().getPath(getNodeRef()).toDisplayPath( services.getNodeService(), services.getPermissionService()); } return displayPath; }
/** * @return Display path to this node - the path built of 'cm:name' attribute values. */ public String getDisplayPath() { if (displayPath == null) { displayPath = this.services.getNodeService().getPath(getNodeRef()).toDisplayPath( services.getNodeService(), services.getPermissionService()); } return displayPath; }