public void postProcess(IObject object) {
if (object.isLoaded()) {
if (object instanceof PermDetails) {
object = ((PermDetails) object).getInternalContext();
if (!object.isLoaded()) {
return;
}
}
Details details = object.getDetails();
this.currentUser.applyContext(details,
!(object instanceof ExperimenterGroup));
final BasicEventContext c = currentUser.current();
final Permissions p = details.getPermissions();
int allow = allowUpdateOrDelete(c, object, details,
Scope.LINK, Scope.EDIT, Scope.DELETE, Scope.ANNOTATE);
allow = addChgrpChownRestrictionBits(object.getClass(), details, allow);
Permissions copy = new Permissions(p);
copy.copyRestrictions(allow, restrictions(object));
details.setPermissions(copy);
}
}