Warning: Can't synchronize with repository "(default)" (/home/git/ome.git does not appear to be a Git repository.). Look in the Trac log for more information.
Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #10618 (new)

Opened 9 years ago

Last modified 8 years ago

Bug: getThumbnailByLongestSide in read-only / private groups — at Version 2

Reported by: wmoore Owned by: jamoore
Priority: critical Milestone: OMERO-4.4.8
Component: Import Version: n.a.
Keywords: n.a. Cc: cxallan, jburel, ux@…
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: n.a.

Description (last modified by wmoore)

tb.getThumbnailByLongestSide() fails for non-owners in private or read-only groups.

I believe this bug exists for dev_4_4 and develop.

E.g. Import SPW data as a regular member of a private group:

$ omero import ~/Documents/biology-data/SPW/mias-frans/siRNA_PRIM1_03102008/
Using session eed7e559-ddb7-48aa-924a-3b3428765707 (will@localhost:4064). Idle timeout: 10.0 min. Current group: private
2013-03-27 14:27:25,730 0          [      main] INFO          ome.formats.importer.ImportConfig  - OMERO Version: 5.0.0-alpha1-DEV-ice34

Then try to get the thumbnail as 'root'

i = conn.getObject("Image", 24)
jpeg = i.renderImage(None, None)
jpeg.show()    # PIL Image shown
tb = i.getThumbnail()

WARNING:omero.gateway:ReadOnlyGroupSecurityViolation on <class 'omero.gateway.OmeroGatewaySafeCallWrapper'> to <83c7cf1a-faa7-4975-89c8-e4328bbe1543omero.api.ThumbnailStore> getThumbnail((object #0 (::omero::RInt)
    _val = 64
}, object #0 (::omero::RInt)
    _val = 64
}, <ServiceOptsDict: {'omero.session.uuid': '43ad1d91-0f0d-43dc-8bad-1b2695cb6702', 'omero.group': '5', 'omero.client.uuid': '17c468ea-b24d-44a0-92e7-3474ce6cc066'}>), {})
Traceback (most recent call last):
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 3455, in __call__
    return self.f(*args, **kwargs)
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero_api_ThumbnailStore_ice.py", line 179, in getThumbnail
    return _M_omero.api.ThumbnailStore._op_getThumbnail.invoke(self, ((sizeX, sizeY), _ctx))
ReadOnlyGroupSecurityViolation: exception ::omero::ReadOnlyGroupSecurityViolation
    serverStackTrace = ome.conditions.ReadOnlyGroupSecurityViolation: Cannot link to ome.model.core.Pixels:Id_23
Current user (root) is an admin or the owner of
the private group (private=rw----). It is not allowed to
link to users' data.
	at ome.security.basic.OmeroInterceptor.evaluateLinkages(OmeroInterceptor.java:464)
	at ome.security.basic.OmeroInterceptor.onSave(OmeroInterceptor.java:154)
	at IceInternal.ThreadPool$EventHandlerThread.run(ThreadPool.java:643)
	at java.lang.Thread.run(Thread.java:680)

    serverExceptionClass = ome.conditions.ReadOnlyGroupSecurityViolation
    message = Cannot link to ome.model.core.Pixels:Id_23
Current user (root) is an admin or the owner of
the private group (private=rw----). It is not allowed to
link to users' data.

Change History (2)

comment:1 Changed 9 years ago by wmoore

  • Priority changed from major to critical

Update: On import with the command line (and Insight too?) we generate thumbnails of 96 x 96 for SPW as well as single images.

If we try to render a different-sized thumbnail using thumbnailStore.getThumbnailByLongestSide() we get errors. E.g. regular user in a read-only group (see below) or Admin in a private group (above).

Recent changes to the Blitz Gateway image.getThumbnail() didn't change the API (we still use direct=True by default) but the webgateway was changed to use direct=False

Webclient renders thumbs of size 96 in a Dataset (which works), but size 64 in SPW (which fails - IN a READ-ONLY / private group).

If I import an image (E.g. DV) via the command line in a read-only group, then try to getThumbnail(direct=False) as another user in that group it fails, unless we use size=96 (to match the existing cached thumbnail).

This means that the webgateway/render_thumbnail/<iid> fails.

# i is an image belonging to another user in a READ-ONLY group...
>>> tb = i.getThumbnail()                                         # OK (since direct=True)
>>> tb = i.getThumbnail(size=96, direct=False)                    # OK (since we have cached thumbs at 96x96)
>>> tb = i.getThumbnail(direct=False)                                   # Fails (uses size 64 by default)...
>>> tb = i.getThumbnail(size=100, direct=False)                  # Fails...

WARNING:omero.gateway:InternalException on <class 'omero.gateway.OmeroGatewaySafeCallWrapper'> to <06012f33-0aeb-4a3c-8df1-0bbecb973b25omero.api.ThumbnailStore> getThumbnailByLongestSide((object #0 (::omero::RInt)
    _val = 100
}, <ServiceOptsDict: {'omero.session.uuid': '63ffc9f2-d30c-452c-afa5-a6f807d0a37c', 'omero.group': '6', 'omero.client.uuid': 'ff1cfd32-24d1-4f6b-8473-5dad07fd116a'}>), {})
Traceback (most recent call last):
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero/gateway/__init__.py", line 3428, in __call__
    return self.f(*args, **kwargs)
  File "/Users/will/Desktop/OMERO/dist/lib/python/omero_api_ThumbnailStore_ice.py", line 215, in getThumbnailByLongestSide
    return _M_omero.api.ThumbnailStore._op_getThumbnailByLongestSide.invoke(self, ((size, ), _ctx))
InternalException: exception ::omero::InternalException
    serverStackTrace = ome.conditions.InternalException: Fatal error retrieving thumbnail metadata for Pixels set id:152
	at ome.services.ThumbnailCtx.getMetadata(ThumbnailCtx.java:442)
Last edited 9 years ago by wmoore (previous) (diff)

comment:2 Changed 9 years ago by wmoore

  • Description modified (diff)
  • Summary changed from Bug: No rdefs for SPW import via cli to Bug: getThumbnailByLongestSide in read-only / private groups
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.67654 sec.)

We're Hiring!