use of alluxio.security.authorization.DefaultAccessControlList in project alluxio by Alluxio.
the class InodeTreePersistentState method applySetAcl.
private void applySetAcl(SetAclEntry entry) {
MutableInode<?> inode = mInodeStore.getMutable(entry.getId()).get();
List<AclEntry> entries = StreamUtils.map(ProtoUtils::fromProto, entry.getEntriesList());
switch(entry.getAction()) {
case REPLACE:
// fully replace the acl for the path
inode.replaceAcl(entries);
break;
case MODIFY:
inode.setAcl(entries);
break;
case REMOVE:
inode.removeAcl(entries);
break;
case REMOVE_ALL:
inode.removeExtendedAcl();
break;
case REMOVE_DEFAULT:
inode.setDefaultACL(new DefaultAccessControlList(inode.getACL()));
break;
default:
LOG.warn("Unrecognized acl action: " + entry.getAction());
}
mInodeStore.writeInode(inode);
}
Aggregations