public void deletePermissions(StoreRef storeRef, String authority) { Acl acl = getAccessControlList(storeRef); if(acl == null) { return; } acl = getMutableAccessControlList(storeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority); pattern.setPosition(Integer.valueOf(0)); aclDaoComponent.deleteAccessControlEntries(acl.getId(), pattern); }
public void deletePermissions(StoreRef storeRef, String authority) { Acl acl = getAccessControlList(storeRef); if(acl == null) { return; } acl = getMutableAccessControlList(storeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority); pattern.setPosition(Integer.valueOf(0)); aclDaoComponent.deleteAccessControlEntries(acl.getId(), pattern); }
public void setPermission(StoreRef storeRef, String authority, PermissionReference permission, boolean allow) { Acl acl = getMutableAccessControlList(storeRef); SimpleAccessControlEntry entry = new SimpleAccessControlEntry(); entry.setAuthority(authority); entry.setPermission(permission); entry.setAccessStatus(allow ? AccessStatus.ALLOWED : AccessStatus.DENIED); entry.setAceType(ACEType.ALL); entry.setPosition(Integer.valueOf(0)); aclDaoComponent.setAccessControlEntry(acl.getId(), entry); }
public void deletePermission(StoreRef storeRef, String authority, PermissionReference permission) { Acl acl = getAccessControlList(storeRef); if(acl == null) { return; } acl = getMutableAccessControlList(storeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority); pattern.setPermission(permission); pattern.setPosition(Integer.valueOf(0)); aclDaoComponent.deleteAccessControlEntries(acl.getId(), pattern); }
public void deletePermission(StoreRef storeRef, String authority, PermissionReference permission) { Acl acl = getAccessControlList(storeRef); if(acl == null) { return; } acl = getMutableAccessControlList(storeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority); pattern.setPermission(permission); pattern.setPosition(Integer.valueOf(0)); aclDaoComponent.deleteAccessControlEntries(acl.getId(), pattern); }
public void setPermission(StoreRef storeRef, String authority, PermissionReference permission, boolean allow) { Acl acl = getMutableAccessControlList(storeRef); SimpleAccessControlEntry entry = new SimpleAccessControlEntry(); entry.setAuthority(authority); entry.setPermission(permission); entry.setAccessStatus(allow ? AccessStatus.ALLOWED : AccessStatus.DENIED); entry.setAceType(ACEType.ALL); entry.setPosition(Integer.valueOf(0)); aclDaoComponent.setAccessControlEntry(acl.getId(), entry); }
public void setPermission(NodeRef nodeRef, String authority, PermissionReference permission, boolean allow) { CreationReport report = null; try { report = getMutableAccessControlList(nodeRef); } catch (InvalidNodeRefException e) { return; } if (report.getCreated() != null) { SimpleAccessControlEntry entry = new SimpleAccessControlEntry(); entry.setAuthority(authority); entry.setPermission(permission); entry.setAccessStatus(allow ? AccessStatus.ALLOWED : AccessStatus.DENIED); entry.setAceType(ACEType.ALL); entry.setPosition(Integer.valueOf(0)); List<AclChange> changes = aclDaoComponent.setAccessControlEntry(report.getCreated().getId(), entry); List<AclChange> all = new ArrayList<AclChange>(changes.size() + report.getChanges().size()); all.addAll(report.getChanges()); all.addAll(changes); getACLDAO(nodeRef).updateChangedAcls(nodeRef, all); } }
public void setPermission(NodeRef nodeRef, String authority, PermissionReference permission, boolean allow) { CreationReport report = null; try { report = getMutableAccessControlList(nodeRef); } catch (InvalidNodeRefException e) { return; } if (report.getCreated() != null) { SimpleAccessControlEntry entry = new SimpleAccessControlEntry(); entry.setAuthority(authority); entry.setPermission(permission); entry.setAccessStatus(allow ? AccessStatus.ALLOWED : AccessStatus.DENIED); entry.setAceType(ACEType.ALL); entry.setPosition(Integer.valueOf(0)); List<AclChange> changes = aclDaoComponent.setAccessControlEntry(report.getCreated().getId(), entry); List<AclChange> all = new ArrayList<AclChange>(changes.size() + report.getChanges().size()); all.addAll(report.getChanges()); all.addAll(changes); getACLDAO(nodeRef).updateChangedAcls(nodeRef, all); } }
public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions) { Acl acl = getAccessControlList(nodeRef); if ((acl == null) && (inheritParentPermissions == INHERIT_PERMISSIONS_DEFAULT)) { return; } if ((acl != null) && (acl.getInherits() == inheritParentPermissions)) { return; } CreationReport report = getMutableAccessControlList(nodeRef); List<AclChange> changes; if (!inheritParentPermissions) { changes = aclDaoComponent.disableInheritance(report.getCreated().getId(), false); } else { Long parentAcl = getACLDAO(nodeRef).getInheritedAcl(nodeRef); changes = aclDaoComponent.enableInheritance(report.getCreated().getId(), parentAcl); } List<AclChange> all = new ArrayList<AclChange>(changes.size() + report.getChanges().size()); all.addAll(report.getChanges()); all.addAll(changes); getACLDAO(nodeRef).updateChangedAcls(nodeRef, all); }
public void setInheritParentPermissions(NodeRef nodeRef, boolean inheritParentPermissions) { Acl acl = getAccessControlList(nodeRef); if ((acl == null) && (inheritParentPermissions == INHERIT_PERMISSIONS_DEFAULT)) { return; } if ((acl != null) && (acl.getInherits() == inheritParentPermissions)) { return; } CreationReport report = getMutableAccessControlList(nodeRef); List<AclChange> changes; if (!inheritParentPermissions) { changes = aclDaoComponent.disableInheritance(report.getCreated().getId(), false); } else { Long parentAcl = getACLDAO(nodeRef).getInheritedAcl(nodeRef); changes = aclDaoComponent.enableInheritance(report.getCreated().getId(), parentAcl); } List<AclChange> all = new ArrayList<AclChange>(changes.size() + report.getChanges().size()); all.addAll(report.getChanges()); all.addAll(changes); getACLDAO(nodeRef).updateChangedAcls(nodeRef, all); }
case OLD: default: CreationReport report = getMutableAccessControlList(nodeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority);
case OLD: default: CreationReport report = getMutableAccessControlList(nodeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority);
case OLD: default: CreationReport report = getMutableAccessControlList(nodeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority);
case OLD: default: CreationReport report = getMutableAccessControlList(nodeRef); SimpleAccessControlEntry pattern = new SimpleAccessControlEntry(); pattern.setAuthority(authority);