[ome-users] Deleting OMERO.web shares

Josh Moore josh.moore at gmx.de
Fri Jun 11 11:35:44 BST 2010


(oops. Looks like this didn't go to the list. Re-sending after seeing 
Ola's email)

Hi Mark.

at the moment, both the user and the application interfaces only provide 
for disabling shares, not deleting them as a non-admin user. If you'd 
like to do it at the SQL level, the only real quirks are to know that 
Shares subclass Sessions and contain ShareMembers, so first you would 
either remove all the users via the API or SQL:

In [9]: sharePrx = session.getShareService()
In [10]: sharePrx.createShare("example", None,
In [12]: sharePrx.createShare("example", None, None, None, None, None)
Out[12]: 60L
In [13]: sharePrx.addUser(60, omero.model.ExperimenterI(0, False))
In [15]: lst = sharePrx.getAllMembers(60)
In [16]: [x.omeName.val for x in lst]
Out[16]: ['root']
In [20]: sharePrx.getAllMembers(60)
Out[20]: []


omero=# delete from sharemember where parent = 60;
DELETE 1

Then to remove the shares, delete first the share and then the session:

omero=# delete from share where session_id = 60;
DELETE 1
omero=# delete from session where id = 60;
DELETE 1
omero=#

Cheers,
~Josh

On 6/9/10 7:23 PM, Woodbridge, Mark R wrote:
> Hi,
>
> Is it possible to delete (rather than deactivate) OMERO.web shares? I can't see how to do it in the UI and it doesn't appear to available using the API (ShareI.java). I've looked at share table in the database with a view to do it using SQL but it's a bit confusing.
>
> Perhaps I'm missing something?
>
> Mark.
>



More information about the ome-users mailing list