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

Opened 12 years ago

Closed 12 years ago

Bug: Delete in rwrw-- group

Reported by: wmoore Owned by: jamoore
Priority: blocker Milestone: OMERO-4.4
Component: Services Version: n.a.
Keywords: n.a. Cc: jamoore, wmoore, jburel, cneves
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: n.a.
Sprint: 2012-07-17 (19)

Description

In both Insight and web in chmod_web branch, deleting another user's Dataset in a rwrw-- group fails for regular members.

There is no error returned, the Dataset is removed from it's Project and becomes an orphan but is not deleted.

Change History (16)

comment:1 Changed 12 years ago by wmoore

Not sure if this is the same issue as #8712?

comment:2 Changed 12 years ago by jmoore

  • Cc jmoore wmoore added; jburel removed
  • Owner changed from jmoore to jburel

(previous comment moved to #8712)

Last edited 12 years ago by jmoore (previous) (diff)

comment:3 Changed 12 years ago by jmoore

  • Owner changed from jburel to jmoore
  • Status changed from new to accepted

Sorry, Will, what test shows rwrw failing?

comment:4 Changed 12 years ago by wmoore

  • Cc jburel added

I don't have a test for this just yet. JM - did you have a test for delete in rwrw-- group for regular members?

comment:5 Changed 12 years ago by jburel

I have the following test testDeleteObjectByMemberRWRW() in integration/DeleteServicePermissionsTest

comment:6 Changed 12 years ago by jmoore

  • Owner jmoore deleted
  • Status changed from accepted to new

comment:7 Changed 12 years ago by jmoore

  • Owner set to jmoore

Is the best way to take care of this to make sure that delete/chgrp/etc all throw if the object can't be found?

comment:8 Changed 12 years ago by wmoore

But this bug isn't that the object can't be found - it's that delete fails when it should work? (or am I missing something?).
According to my gdoc, a regular member of a rwrw-- group should be able to delete the data belonging to another member.

comment:9 Changed 12 years ago by jmoore

Will, right, then a test would definitely be good. Jean-Marie's test passes (if I remember correctly)

comment:10 Changed 12 years ago by jmoore

  • Owner changed from jmoore to wmoore

Pushing to Will for a test.

comment:11 Changed 12 years ago by wmoore

  • Owner changed from wmoore to jmoore

Added failing test for delete in rwrw-- group. https://github.com/will-moore/openmicroscopy/commit/5390b8d57ac24e140c9cc66544cb1b56b4dd6e09
In my sprint16-bugfixes branch.

jrs-macbookpro-25107:test will$ python gatewaytest/chmod.py CustomUsersTest.testDelete8723
F
======================================================================
FAIL: Tests whether regular members can delete each other's data in rwrw-- group
----------------------------------------------------------------------
Traceback (most recent call last):
  File "gatewaytest/chmod.py", line 364, in testDelete8723
    self.assertEqual(None, p, "Project should be Deleted")
AssertionError: Project should be Deleted

----------------------------------------------------------------------
Ran 1 test in 7.443s

FAILED (failures=1)

comment:12 Changed 12 years ago by jburel

  • Sprint changed from 2012-05-22 (15) to 2012-06-05 (16)

Moved from sprint 2012-05-22 (15)

comment:13 Changed 12 years ago by jburel

  • Sprint changed from 2012-06-05 (16) to 2012-06-19 (17)

Moved from sprint 2012-06-05 (16)

comment:14 Changed 12 years ago by jmoore

  • Resolution set to fixed
  • Status changed from new to closed

Updated permissionsClause in GraphStep to permit deleting (and chgrping, etc). data that's in a rwrw group by members. Pushed to sprint17-bugfixes:

commit 01da6e707f96aac572f68d6695c15beedfeca284
Author: jmoore <josh@glencoesoftware.com>
Date:   Fri Jun 8 14:24:51 2012

    Allow member-graph operations in rwrw group (Fix #8723)
    
    With the introduction of the new permission level,
    we can now allow group members in rwrw like group
    owners in other groups to perform graph operations
    like delete and chgrp.


comment:15 Changed 12 years ago by jmoore

  • Cc cneves-x added
  • Priority changed from major to blocker
  • Resolution fixed deleted
  • Sprint changed from 2012-06-19 (17) to 2012-07-17 (19)
  • Status changed from closed to reopened

Carlos has run into an issue of deleting in rwrw groups with -1 set. This is caused by the group permissions in a -1 call context being Permissions.DUMMY. Currently looking for a workaround.

comment:16 Changed 12 years ago by jmoore

  • Resolution set to fixed
  • Status changed from reopened to closed

New commit pushed to 9605-delete-refactoring (See also #8881) which creates an EventContext based on the group of the object in question. This should now be working:

commit 4bc32af9d14dd11ec04c8fb045efa6a7d1eedc6f
Author: jmoore <josh@glencoesoftware.com>
Date:   Thu Jul 5 17:05:43 2012

    Handle -1 call context in rwrw graph operations (Fix #8723)
    
    When a -1 was passed for omero.group, the event context
    contained invalid values for the current group (there
    was none, essentially). Now, we use the group of the
    top-level object as the basis for deciding what is
    permitted.


Note: I looked into changing the rwrw tests in DeleteServicePermissionsTest.java to rwra, but then the linkages are not allowed. More investigation is needed.

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

We're Hiring!