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 #9621 (closed)

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

Bug: Viewing ROIs in read-only group

Reported by: bpindelski Owned by: cxallan
Priority: critical Milestone: OMERO-4.4.4
Component: Web Version: n.a.
Keywords: n.a. Cc: jburel, sbesson
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2012-09-25 (5)

Description (last modified by bpindelski)

Discovered as part of QA testing on 17/09/2012. Logged in as user-4:read-only-1. User-2 and user-9 also in this group, both have ROIs on their images. When trying to view ROIs in Web, ROI count displays 0. In Inisght, ROIs can be viewed (but not edited, as expected).

Also tested user-4:read-write-1. In Insight, viewing, deleting and editing ROIs of other users works fine. In Web, the ROI count is still displayed as 0.

Change History (11)

comment:1 Changed 12 years ago by bpindelski

  • Description modified (diff)

comment:2 Changed 12 years ago by bpindelski

  • Sprint set to 2012-09-25 (5)

comment:3 Changed 12 years ago by wmoore

E.g. https://gretzky.openmicroscopy.org.uk/omero/webclient/?show=image-3376 user-4 can't see ROIs belonging to user-2

comment:4 Changed 12 years ago by wmoore

  • Owner changed from wmoore to cxallan

Currently, Chris' lookup for getRoiCount() in blitz gateway only looks for ROIs owned by the current user ( see below).
Chris, do you need this behaviour, or could we look for ROIs owned by anyone (or even add an expId parameter: getRoiCount(expId) if we really need it?

        # Optimisation for the most common use case of unfiltered ROI counts
        # for the current user.
        if shapeType is None:
            params = omero.sys.ParametersI()
            params.addLong('imageId', self.id)
            params.addLong('ownerId', self._conn._userid)
            count = self._conn.getQueryService().projection(
                    'select count(*) from Roi as roi ' \
                    'where roi.image.id = :imageId ' \
                    'and roi.details.owner.id = :ownerId', params, self._conn.SERVICE_OPTS)
            # Projection returns a two dimensional array of RType wrapped
            # return values so we want the value of row one, column one.
            return count[0][0].getValue()

comment:5 Changed 12 years ago by cxallan

  • Cc jburel sbesson added
  • Status changed from new to accepted

This brings in all sorts of nasty implications (CC'ing Jean-Marie and Sebastien) such as how to differentiate ROIs drawn by someone else on an Image which I don't know that we've ever handled. Ensuring that the counting respects eid is pretty trivial. Though it looks like 7ae53f53901f7ab5c636d09e6fa6a30efa5f1789 broke the actual retrieval (eid is never used now) even if a shape type is passed in which is why I completely ignored it in my optimization in 94ca5a2ee9abc25012aa17fb0f38ff5c7f72803d. I was just trying to keep the same return values for given arguments.

It looks like this all went kind of haywire in the pursuit of closing #8990.

*   b194fc1 Merge pull request #26 from sbesson/8990-roioptions
| * 7ae53f5 Use RoiOptions in BlitzGateway getROICount() method
| * c297b35 Merge multiple getROICount() tests under a single test
* | 08dfd72 Ensure detachOnDestroy() is always called. (Fixes #8812)
* | 46f191d Add warning to createClient javadoc (See #8812, #9168)
* | 45abc7d bioformats: move to latest melissalinkert:sprint17-bug-fixes
* | 3c74ca2 Update permissions icons (see #8695)
* | 55daecc Fix containers_table.html malformed html. Hopefully fix #9131
* a3f3d9e fixing labels alignment in forms, close #9151

comment:6 Changed 12 years ago by cxallan

  • Remaining Time set to 0.25

comment:8 Changed 12 years ago by cxallan

  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed

comment:9 Changed 12 years ago by Chris Allan <callan@…>

(In [a07af7ac28cb59fd65f61218ff9f063cfab76680/ome.git] on branch develop) Fix missed usage of _userid (See #9621)

In 5d1c2cde9e8db635b00e7b1cd7e09aa8345faff9 we switched to a method for
accessing this property as it is now lazily loaded. This particular
usage was missed.

comment:10 Changed 12 years ago by Chris Allan <callan@…>

(In [55423ef04f09c48f10d13b603dd6656c055a9d3a/ome.git] on branch develop) Add failing assertion. (See #9621)

comment:11 Changed 12 years ago by Chris Allan <callan@…>

(In [90763c37cbf8c8a138490cddd41a6dd16beb6449/ome.git] on branch develop) Fix ROI counting mismatch. (See #9621)

Includes a fix for ROI counting mismatches along with a slight change to
the method signature and documentation to be more explicit. Also
included are extensions to the unit tests to cover non-typed ROI
counting usage cases.

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.67407 sec.)

We're Hiring!