use of org.molgenis.data.security.PackageIdentity in project molgenis by molgenis.
the class EntityTypeRepositorySecurityDecorator method createAcl.
@Override
public void createAcl(EntityType entityType) {
MutableAcl acl = mutableAclService.createAcl(new EntityTypeIdentity(entityType.getId()));
Package pack = entityType.getPackage();
if (pack != null) {
ObjectIdentity objectIdentity = new PackageIdentity(pack);
acl.setParent(mutableAclService.readAclById(objectIdentity));
mutableAclService.updateAcl(acl);
}
}
use of org.molgenis.data.security.PackageIdentity in project molgenis by molgenis.
the class EntityTypeRepositorySecurityDecorator method updateAcl.
@Override
public void updateAcl(EntityType entityType) {
MutableAcl acl = (MutableAcl) mutableAclService.readAclById(new EntityTypeIdentity(entityType.getId()));
Package pack = entityType.getPackage();
if (pack != null) {
ObjectIdentity objectIdentity = new PackageIdentity(pack);
Acl parentAcl = mutableAclService.readAclById(objectIdentity);
if (!parentAcl.equals(acl.getParentAcl())) {
acl.setParent(parentAcl);
mutableAclService.updateAcl(acl);
}
}
}
use of org.molgenis.data.security.PackageIdentity in project molgenis by molgenis.
the class PackageRepositorySecurityDecorator method deleteAcl.
private void deleteAcl(String id) {
PackageIdentity packageIdentity = new PackageIdentity(id);
mutableAclService.deleteAcl(packageIdentity, true);
}
use of org.molgenis.data.security.PackageIdentity in project molgenis by molgenis.
the class PackageRepositorySecurityDecorator method updateAcl.
private void updateAcl(Package pack) {
PackageIdentity packageIdentity = new PackageIdentity(pack);
MutableAcl acl = (MutableAcl) mutableAclService.readAclById(packageIdentity);
if (pack.getParent() != null) {
ObjectIdentity parentIdentity = new PackageIdentity(pack.getParent());
Acl parentAcl = mutableAclService.readAclById(parentIdentity);
if (!parentAcl.equals(acl.getParentAcl())) {
acl.setParent(parentAcl);
mutableAclService.updateAcl(acl);
}
}
}
use of org.molgenis.data.security.PackageIdentity in project molgenis by molgenis.
the class PackageRepositorySecurityDecorator method createAcl.
private void createAcl(Package pack) {
PackageIdentity packageIdentity = new PackageIdentity(pack);
MutableAcl acl = mutableAclService.createAcl(packageIdentity);
if (pack.getParent() != null) {
ObjectIdentity parentIdentity = new PackageIdentity(pack.getParent());
Acl parentAcl = mutableAclService.readAclById(parentIdentity);
acl.setParent(parentAcl);
mutableAclService.updateAcl(acl);
}
}
Aggregations