qupath / qupath-extension-omero-web

QuPath extension to work with images through OMERO's web API
GNU General Public License v3.0
8 stars 12 forks source link

default group and user after login #13

Open pwalczysko opened 2 years ago

pwalczysko commented 2 years ago

This is an RFE:

  1. Have an OMERO.server with a user which is a member of more than one group, and is able to see data of other users too (for example, one of the groups which the user is a member of is of Read-annotate permissions type). This cannot be idr.op...py.org or your account on demo.ope...py.org, because there the user is a member of only one group and cannot see any other data then their own.
  2. login to an OMERO.server using this QuPath extension as that user
  3. observe that the group which is by default on the dropdown menu is not the default group of the user in OMERO serse, see screenshot.
  4. Observe that when a group is navigated where the user has the right to see the data of others, the default view is "All members", which is not typical - the user would probably like to see first their own data only.

To understand better the concept of a default group in OMERO, see https://omero-guides.readthedocs.io/projects/introduction/en/latest/group-user-management.html#web-interface-users-change-their-own-settings

Happy to discuss further and give more info if this is something worth improving for you. Also, we could for example set up a new group for you on our demo server and put @melvingelbard into that group, so that you have an environment where you can explore a more realistic OMERO setup. Would you be interested in that ?

Screenshot (note that the user's default group is not "Lab2", but the "Lab1" on the server)

Screenshot 2021-11-03 at 18 38 52

melvingelbard commented 2 years ago

Hi @pwalczysko , This feature request has come up in the past, and I remember postponing its implementation in order to finish the main features of the extension. Now that the rest is looking functional, I'd be happy to have a look at 'default groups'. We can have a chat and/or set up a demo server with different 'default groups' to investigate this!

A couple of questions though:

  1. Can there be more than one 'default group'?
  2. Can I get this info via the OMERO JSON API?
pwalczysko commented 2 years ago

Thank you @melvingelbard , I am working on the demo group setup for you, will let you know once it is ready. Yes, we can have a chat, maybe let us first do the demo groups and also let us answer your questions below.

A couple of questions though:

1. Can there be more than one 'default group'?

This one is easy. No. There is only one single default group for each user. The user can be a member of as many groups as you like though (only one of which is default).

2. Can I get this info via the OMERO JSON API?

I do not know this and we have to ask @will-moore, please.

will-moore commented 2 years ago

@melvingelbard When you log in, the JSON response to the login POST should contain a groupId that shows the group you logged in to (default group). I don't know of a way to get this info once you're already logged in. Could add this if needed?

pwalczysko commented 2 years ago

@melvingelbard I have created a new group on the demo server called QuPath-devs and put the user Melvin Gelbard into it. Together with that user, another user is in the group as well, called tester2 test-petr and I have imported some data for that user. In this way, you can see the situation for a user being a member of 2 groups, 2021-02 and QuPath-devs. The default group for your user is 2021-02 and if you navigate to the other , QuPath-devs group, you can see the data of tester2 test-petr user. You can change your default group at your leisure following https://omero-guides.readthedocs.io/projects/introduction/en/latest/group-user-management.html#web-interface-users-change-their-own-settings workflow. Let us know if something more needed or unclear. If you think you need more users, please apply for a new user account on the demo server http://qa.openmicroscopy.org.uk/registry/demo_account/ and tell me the username.

pwalczysko commented 2 years ago

@pwalczysko Thanks for setting up the server. I don't know where it is or how to access it though. Do you have a link I could use (+credentials if needed)? I'll try to have a look at the default groups this week.

FYI Sorted via image.sc, I think we are good here (cc @will-moore )

melvingelbard commented 2 years ago

Thanks @pwalczysko & @will-moore ,

I've now created a PR that will fix the issues mentioned above such that:

  1. The browser is now automatically set to the user's default group.
  2. The browser is now automatically set to the user's own projects/datasets/images (every time the group is updated, QuPath will look for the user's projects/datasets/images. Not only on first show).

It won't be included directly as I'd prefer testing this to be sure nothing else was broken first!