broker.flush();
return;
// return true;
}
transact.abort(transaction);
throw new PermissionDeniedException("not allowed to change permissions");
}
LOG.debug("changing permissions on collection " + resource);
final Permission perm = collection.getPermissionsNoLock();
if (perm.getOwner().equals(session.getUser())
|| manager.hasAdminPrivileges(session.getUser())) {
perm.setMode(permissions);
if (owner != null) {
perm.setOwner(owner);
perm.setGroup(ownerGroup);
}
transaction.registerLock(collection.getLock(), Lock.WRITE_LOCK);
broker.saveCollection(transaction, collection);
transact.commit(transaction);
broker.flush();
return;
}
transact.abort(transaction);
throw new PermissionDeniedException("not allowed to change permissions");
} catch (final IOException e) {
transact.abort(transaction);
throw new RemoteException(e.getMessage());
} catch (final PermissionDeniedException e) {
transact.abort(transaction);