use of org.jbei.ice.storage.model.Permission in project ice by JBEI.
the class EntryPermissions method removePermission.
public void removePermission(long permissionId) {
Permission permission = permissionDAO.get(permissionId);
if (permission == null)
return;
// expect user to be able to modify entry
authorization.expectWrite(userId, entry);
// permission must be for entry and specified entry
if (permission.getEntry() == null || permission.getEntry().getId() != entry.getId())
return;
permissionDAO.delete(permission);
}
Aggregations