openmicroscopy/openmicroscopy — pull request #135 by joshmoore (2012-03-29 11:26:38+00:00)
Title: 2874 chmod

This branch contains a significant reworking of what was previously ```IAdmin.changePermissions()``` (now omero.cmd.Chmod). Changing group permissions should be MUCH faster, since all permissions in the DB are no longer being modified. In fact, the permissions for non-group objects are simply ignored.

The only case which is somewhat slower (but still faster than previously) is when removing the read permissions on a group, since connections must be checked. A SecurityViolation will be thrown in something is found which should not be present. Further, the chmod action is cancel-able like Delete and Chgrp.

This branch also contains new state on all objects (reachable via ```permissions.canAnnotate()```, ```permissions.canEdit()```, ```details.getCallContext()```, ```details.getEventContext())```) to help clients more easily know what they can do with the objects they receive.

### Testing ###

Please move your implementations to use chmod, test the speed, remove any warnings about slow downgradings, and start to get a feel for ```canAnnotate``` and ```canEdit```