privileges canChgrp#5352
Conversation
|
It's probably outwith this PR but FYI when one has the actual object's details in hand we now have a couple more can* methods that should always work: |
|
@mtbc - It would be nice to user server logic for When I print it, it's just a dict: |
|
Huh, that's interesting. Your |
|
travis failing. |
|
Ah, I didn't realise that @mtbc's PR wasn't getting included in the merged build yet. |
|
My PR's in breaking: feel free to add |
|
All four tests from the header of this PR passed. All works as expected. |
|
not included in today's build |
|
With #5358 that kind of query now gives me results like |
sbesson
left a comment
There was a problem hiding this comment.
One stylistic request, then this is good to merge.
| permissionsCss.append("isOwned") | ||
| if ownerid == conn.getUserId() or conn.isAdmin(): | ||
| if (ownerid == conn.getUserId() or | ||
| "Chgrp" in conn.getEventContext().adminPrivileges): |
There was a problem hiding this comment.
Looks good. For unification of our codebase, can this be adjusted to use the enums as in https://github.com/openmicroscopy/openmicroscopy/pull/5376/files#diff-4c592a4ec58d6f4830c88b81f8aa77a3R66
Don't need this now since we're not using getEventContext in unit test This reverts commit cf8620e.
|
Use canChgrp from #5358 now. |
|
The UI retest indicated in #5352 (comment) and started according to the header of this PR fails on:
|
|
For some reason, the functionality added in #5358 has stopped working and the |
|
I haven't yet managed to reproduce the missing flags locally (via |
|
So, while I am always getting those map entries, they are wrongly |
|
@mtbc Before this PR, there was no check that the permissions loaded like this: were correct, partly because the |
|
@mtbc I'll close this until we have canChgrp flag working in |
|
Ooops. Forgot to point out that this can likely be re-opened with #5437 though at this point we can await the status of this mornings integration tests: https://ci.openmicroscopy.org/job/OMERO-DEV-merge-integration/748/ |
|
Reopening this to test against #5437. |
|
Test permissions now passing with #5437 https://ci.openmicroscopy.org/job/OMERO-DEV-merge-integration-Python27/630/testReport/OmeroPy.test.integration.test_permissions/ |
| # isOwned and canChgrp is True | ||
| expected.append('isOwned') | ||
| expected.append('canChgrp') | ||
| # expected.append('canChgrp') |
|
@sbesson : I assume you're happy with this? |
What this PR does
Fixes bug of Light Admin without
canChgrpprivilege still being able to do chgrp in webcilent.See "crash on Move in not-your-group" checkbox in https://trello.com/c/LUzfIhaU/46-crashes-in-webclient
Testing this PR
ChgrpprivilegeChgrpprivilege should still be able to move others' data.Chgrpshould still be able to move their own data.cc @pwalczysko @mtbc