@Override
public void modify(final Permission permission) throws PermissionDeniedException {
if(permission instanceof SimpleACLPermission) {
//add the ace
final SimpleACLPermission aclPermission = ((SimpleACLPermission)permission);
aclPermission.addACE(access_type, target, name, mode);
} else {
throw new PermissionDeniedException("ACL like permissions have not been enabled");
}
}
});