openmicroscopy/openmicroscopy — pull request #1045 by sbesson (2013-04-16 10:59:58+00:00)
Title: OMERO.matlab: add permissions to the object loading methods

This PR refactors all the objectg loading functions of the OMERO.matlab to add some more permission control.

Summary of changes:
- add parameter/value optional `owner` argument allowing to specify the owner identifiers
- define default owner argument depending on the value of the object identifier input. If no identifier or empty identifier, set the default owner to the session user, else set to -1.
- refactor `getImages()` method to load images contained in project/dataset.

To test:
- project/dataset/screen/plate/plateacquisition
``getXXX(session), getXXX(session, [])`` should return all the objects owned by the session user (in the context of the session group)
``getXXX(session, 'owner', ownerId)`` should return the objects owned by ownerId (in the context of the session group)
``getXXX(session, ids)`` should return all the objects identified by ids owned by any user (in the context of the session group)
``getXXX(session, ids, 'owner', ownerId)`` should return all the objects identified by ids owned by ownerId (in the context of the session group)

- images: test all the signatures above as well as
``getImages(session, 'project', projectIds)`` should return all the images contained in the projects identified by projectIds owned by any user.
``getImages(session, 'dataset', datasetIds)`` should return all the images contained in the datasets identified by datasetIds owned by any user.