We're Hiring!

Enable iviewer for Public User

Having a problem deploying OMERO? Please ask new questions at https://forum.image.sc/tags/omero
Please note:
Historical discussions about OMERO. Please look for and ask new questions at https://forum.image.sc/tags/omero

The OMERO.server installation documentation begins here and you can find OMERO.web deployment documentation here.

Enable iviewer for Public User

Postby dsudar » Thu Jul 26, 2018 2:17 am

Hi team,

I would like to allow people accessing our public image repo for our LINCS project (https://omero.lincsclarion.org/ and click on OMERO) to optionally use iviewer to visualize the images. When I install iviewer per usual, it works fine for non-public users but when the public user selects the Open With... OMERO.iviewer, it pops him/her back to a login screen. How do I enable iviewer for the Public User?

omero config iget says:
Code: Select all
omero.data.dir=/data/OMERO
omero.db.name=omerodb
omero.db.pass=********
omero.db.user=omero
omero.web.application_server=wsgi-tcp
omero.web.apps=["omero_iviewer"]
omero.web.open_with=[["Image viewer", "webgateway", {"supported_objects": ["image"], "script_url": "webclient/javascript/ome.openwith_viewer.js"}], ["omero_iviewer", "omero_iviewer_index", {"supported_objects": ["images", "dataset", "well"], "script_url": "omero_iviewer/openwith.js", "label": "OMERO.iviewer"}]]
omero.web.public.enabled=True
omero.web.public.password=********
omero.web.public.server_id=1
omero.web.public.url_filter=^/(webadmin/myphoto/|webclient/(?!(action|logout|annotate_(file|tags|comment|rating|map)|script_ui|ome_tiff|figure_script))|webgateway/(?!(archived_files|download_as)))
omero.web.public.user=public


Thanks,
- Damir
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: Enable iviewer for Public User

Postby rgozim » Thu Jul 26, 2018 3:26 pm

Hi Damir,

I've just tested a local OMERO.web with a similar config to yours and it worked fine:

Code: Select all
omero.web.public.enabled=True
omero.web.public.password=********
omero.web.public.url_filter=^/(webadmin/myphoto/|webclient/(?!(action|logout|annotate_(file|tags|comment|rating|map)|script_ui|ome_tiff|figure_script))|webgateway/(?!(archived_files|download_as)))
omero.web.public.user=bob


Could there be a cookie or cache issue going on, on your browser?

Also, which version of OMERO & iViewer are you running?

Thanks,
Riad
User avatar
rgozim
Team Member
 
Posts: 25
Joined: Thu Jul 20, 2017 9:09 am

Re: Enable iviewer for Public User

Postby dsudar » Thu Jul 26, 2018 6:36 pm

Hi Riad,

Thanks for the quick response.

It is OMERO 5.4.6 (this morning upgraded to 5.4.7 but no change in behaviour) and iViewer 0.5.0.

I tried clearing browser cache and even copying the target URL to a different browser and behaviour remains the same.

Maybe one clue: the URL that Open With ... OMERO.iviewer wants to go to is:
https://omero.lincsclarion.org/iviewer/?images=29697
which is correct and works fine for a non-public user.
But when coming in as a public user, that URL changes immediately to:
https://omero.lincsclarion.org/webclien ... es%3D29697
and that gives me the login screen. And in that login screen clicking on "Login as public user" pops me back to main OMERO.web page.

Cheers,
- Damir
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: Enable iviewer for Public User

Postby rgozim » Fri Jul 27, 2018 2:04 pm

Hi Damir,

It would seem that it was my browser that had an old cache/cookie causing the URL to work :roll:

Here is an example of a URL that we use for public usage of OMERO:

Code: Select all
omero.web.public.url_filter: ^\/(iviewer|figure(?!\/new)|webadmin\/myphoto\/|webclient\/(?!(scrip    t_ui|ome_tiff|figure_script|render_image_download|download_|ome_tiff_script|archived_files\/download|download_orig_metadata))|webgateway\/(?!(archived_files|download_as)))


You could just use the above url_filter if you want. If not, you can to see it contains "/(iviewer|etc" in the string, which you'll need to add to your current url_filter in order for iViewer to be publicly accessible.

Thanks,
Riad
User avatar
rgozim
Team Member
 
Posts: 25
Joined: Thu Jul 20, 2017 9:09 am

Re: Enable iviewer for Public User

Postby dsudar » Fri Jul 27, 2018 5:58 pm

Hi Riad,

Perfect, thanks! That worked. I replaced my filter with the one you provided and the public user can now use iviewer. Now I'm trying to decipher what all the new filter permits and doesn't permit. Most of it is clear but:

- when a functionality is not permitted by the filter (e.g. Export as OME-TIFF or Export as JPG), it fails by either dropping you back to the regular webclient view or even by dropping you back to the login screen. Is that expected behaviour? Seems a little rude :)
- while iviewer works, it does not display ROIs. It just says "Loading regions ..." and then nothing. Meanwhile, the classical viewer can show ROIs fine.

Thanks,
- Damir
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: Enable iviewer for Public User

Postby rgozim » Mon Jul 30, 2018 8:49 pm

Hi Damir,

I'll take note of the behaviour you mentioned in the first point and discuss it with Will when he gets back from his holiday. It might be easier to expose less public functionality if it makes things more complex.

As for the second, does the image you tested have a large number of ROIs (i.e. more than 500)? Also are you able to check the development tools of your web browser and see if there are any errors displayed in the console when you try to load the ROIs for any image you're seeing the issue with?

Thanks,
Riad
User avatar
rgozim
Team Member
 
Posts: 25
Joined: Thu Jul 20, 2017 9:09 am

Re: Enable iviewer for Public User

Postby dsudar » Tue Jul 31, 2018 5:16 pm

Hi Riad,

Yes, I noticed in IDR that a number of buttons and such are simply not displayed. That is indeed a cleaner way.

On the ROIs: typically I have between 100 and 400 ROIs per image. One example:
https://omero.lincsclarion.org/iviewer/?images=362093

In the browser's dev tool console I do indeed get an error but I'm not sure how to interpret:


When I log into the same server as a non-public user, the same image with the same ROIs display perfectly fine.

Thanks,
- Damir
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA

Re: Enable iviewer for Public User

Postby wmoore » Wed Aug 08, 2018 4:07 pm

Hi Damir,

I think you also need to add 'api' to the public URL filter (see viewtopic.php?f=4&t=8510 for a config that works for iviewer).

This is because we're using /api/ URLS to load ROIs and list images in Dataset etc.

Apologies, we'll try to improve the docs for this.

Regards,

Will.
User avatar
wmoore
Team Member
 
Posts: 674
Joined: Mon May 18, 2009 12:46 pm

Re: Enable iviewer for Public User

Postby dsudar » Wed Aug 08, 2018 7:58 pm

Hi Will,

Thanks for providing the missing bit. Indeed, adding 'api' to the public.url_filter made it all work fine.

Cheers,
- Damir
dsudar
 
Posts: 235
Joined: Mon May 14, 2012 8:43 pm
Location: Berkeley, CA, USA


Return to Installation and Deployment

Who is online

Users browsing this forum: No registered users and 0 guests