AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); acl = aclCrudDAO.getAclForUpdate(changes.get(0).getAfter()); acl.setInherits(Boolean.TRUE); acl.setAclChangeSetId(getCurrentChangeSetId());
/** * {@inheritDoc} */ @Override public List<AclChange> disableInheritance(Long id, boolean setInheritedOnAcl) { AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); List<AclChange> changes = new ArrayList<AclChange>(1); switch (acl.getAclType()) { case FIXED: case GLOBAL: return Collections.<AclChange> singletonList(new AclChangeImpl(id, id, acl.getAclType(), acl.getAclType())); case OLD: acl.setInherits(Boolean.FALSE); acl.setAclChangeSetId(getCurrentChangeSetId()); aclCrudDAO.updateAcl(acl); changes.add(new AclChangeImpl(id, id, acl.getAclType(), acl.getAclType())); return changes; case SHARED: // TODO support a list of children and casacade if given throw new IllegalArgumentException("Shared ACL must inherit"); case DEFINING: case LAYERED: default: return disableInheritanceImpl(id, setInheritedOnAcl, acl); } }
/** * {@inheritDoc} */ @Override public List<AclChange> disableInheritance(Long id, boolean setInheritedOnAcl) { AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); List<AclChange> changes = new ArrayList<AclChange>(1); switch (acl.getAclType()) { case FIXED: case GLOBAL: return Collections.<AclChange> singletonList(new AclChangeImpl(id, id, acl.getAclType(), acl.getAclType())); case OLD: acl.setInherits(Boolean.FALSE); acl.setAclChangeSetId(getCurrentChangeSetId()); aclCrudDAO.updateAcl(acl); changes.add(new AclChangeImpl(id, id, acl.getAclType(), acl.getAclType())); return changes; case SHARED: // TODO support a list of children and casacade if given throw new IllegalArgumentException("Shared ACL must inherit"); case DEFINING: case LAYERED: default: return disableInheritanceImpl(id, setInheritedOnAcl, acl); } }
AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); acl = aclCrudDAO.getAclForUpdate(changes.get(0).getAfter()); acl.setInherits(Boolean.TRUE); acl.setAclChangeSetId(getCurrentChangeSetId());
AclUpdateEntity list = aclCrudDAO.getAclForUpdate(aclId); aclChanges.add(new AclChangeImpl(aclId, aclId, list.getAclType(), list.getAclType())); acls.add(list);
AclUpdateEntity list = aclCrudDAO.getAclForUpdate(aclId); aclChanges.add(new AclChangeImpl(aclId, aclId, list.getAclType(), list.getAclType())); acls.add(list);
aclToCopy = aclCrudDAO.getAclForUpdate(toCopy); aclToCopy.setRequiresVersion(true); aclToCopy.setAclChangeSetId(getCurrentChangeSetId()); if ((inheritedId != null) && (!inheritedId.equals(toCopy))) AclUpdateEntity inheritedAcl = aclCrudDAO.getAclForUpdate(inheritedId); inheritedAcl.setRequiresVersion(true); inheritedAcl.setAclChangeSetId(getCurrentChangeSetId()); aclToCopy = aclCrudDAO.getAclForUpdate(toCopy); aclToInheritFrom = null; if (toInheritFrom != null) aclToCopy = aclCrudDAO.getAclForUpdate(toCopy); aclToInheritFrom = null; if (toInheritFrom != null)
aclToCopy = aclCrudDAO.getAclForUpdate(toCopy); aclToCopy.setRequiresVersion(true); aclToCopy.setAclChangeSetId(getCurrentChangeSetId()); if ((inheritedId != null) && (!inheritedId.equals(toCopy))) AclUpdateEntity inheritedAcl = aclCrudDAO.getAclForUpdate(inheritedId); inheritedAcl.setRequiresVersion(true); inheritedAcl.setAclChangeSetId(getCurrentChangeSetId()); aclToCopy = aclCrudDAO.getAclForUpdate(toCopy); aclToInheritFrom = null; if (toInheritFrom != null) aclToCopy = aclCrudDAO.getAclForUpdate(toCopy); aclToInheritFrom = null; if (toInheritFrom != null)
final AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); if (!acl.isLatest()) AclUpdateEntity inheritedForUpdate = aclCrudDAO.getAclForUpdate(inherited.getId()); if (inheritedForUpdate != null)
final AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); if (!acl.isLatest()) AclUpdateEntity inheritedForUpdate = aclCrudDAO.getAclForUpdate(inherited.getId()); if (inheritedForUpdate != null)
AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(changes.get(0).getAfter()); final Long inheritsFrom = acl.getInheritsFrom(); acl.setInherits(Boolean.FALSE);
AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(changes.get(0).getAfter()); final Long inheritsFrom = acl.getInheritsFrom(); acl.setInherits(Boolean.FALSE);
public Long getInheritedAccessControlList(Long id) AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); if (acl.getAclType() == ACLType.OLD)
public Long getInheritedAccessControlList(Long id) AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); if (acl.getAclType() == ACLType.OLD)
List<Ace> inherited, List<Integer> positions, int depth, WriteMode mode, boolean requiresVersion) AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); if (!acl.isLatest()) AclUpdateEntity parentAcl = aclCrudDAO.getAclForUpdate(writableParentAcl); parentAcl.setInheritedAcl(created); aclCrudDAO.updateAcl(parentAcl);
List<Ace> inherited, List<Integer> positions, int depth, WriteMode mode, boolean requiresVersion) AclUpdateEntity acl = aclCrudDAO.getAclForUpdate(id); if (!acl.isLatest()) AclUpdateEntity parentAcl = aclCrudDAO.getAclForUpdate(writableParentAcl); parentAcl.setInheritedAcl(created); aclCrudDAO.updateAcl(parentAcl);