Bug #22235
closedOffering edit options on collections/containers requests when project is frozen
Description
So it looks like there are multiple issues, I'm going to start making screenshots.
Regular user, read-only project in "Shared with me". I think the operations are correct, but the ordering is wrong.
Regular user, read-only project in "Favorite". This is probably the same bug as previous.
Regular user, frozen project in "Shared with me". This has two major problems; the user does not have "manage" access, so they should not be offered the "Share" icon; similarly, the user does not have access to un-freeze the project (depending on the config value UnfreezeProjectRequiresAdmin
this requires either "manage" or "admin" access).
Project within a read-only project. This might be the same bug as the first two.
Workflow run within a read-only project. The "edit" and "remove" icons shouldn't be there.
Workflow run within a read-only project, viewed in "All processes". The "edit" and "remove" icons shouldn't be there.
Project in a project with write access. The "share" and "freeze" icons shouldn't be there. Also, the "freeze" icon seems to be disabled, clicking on it doesn't do anything.
Collection in a project with write access. The "share" icon shouldn't be there.
Files
Updated by Peter Amstutz 4 months ago
- Description updated (diff)
- File regular-user-frozen-project.png regular-user-frozen-project.png added
- File regular-user-readonly-project.png regular-user-readonly-project.png added
- File regular-user-favorite.png regular-user-favorite.png added
Updated by Peter Amstutz 4 months ago
- Description updated (diff)
- File project-in-readonly-project.png project-in-readonly-project.png added
- File process-in-readonly-project.png process-in-readonly-project.png added
Updated by Peter Amstutz 4 months ago
- Description updated (diff)
- File all-processes-readonly-process.png all-processes-readonly-process.png added
- File project-in-writable-project.png project-in-writable-project.png added
- File collection-in-writable-project.png collection-in-writable-project.png added
Updated by Peter Amstutz 4 months ago
- Target version changed from Development 2024-10-23 sprint to Development 2024-11-06 sprint
Updated by Lisa Knox 3 months ago
22235-toolbar-access-fixes @ de29bf7e3872c4e21f7c94a20872b705c101b0ec
developer-run-tests-services-workbench2: #1329
- ✅ All agreed upon points are implemented / addressed.
- ✅ Anything not implemented (discovered or discussed during work) has a follow-up story.
n/a - ✅ Code is tested and passing, both automated and manual, what manual testing was done is described
Tested by trying and failing to reproduce bugs. - ✅ New or changed UX/UX and has gotten feedback from stakeholders.
The only changes are the requested changes to the menu items. - ✅ Documentation has been updated.
n/a - ✅ Behaves appropriately at the intended scale (describe intended scale).
intended scale is a single user selecting a single resource. - ✅ Considered backwards and forwards compatibility issues between client and server.
no changes - ✅ Follows our coding standards and GUI style guidelines.
- A new toolbar/context menu kind was created for the writeable, non-admin cases: the writeableProject and writeableCollection kinds.
- A bug cropped up where if a new toolbar populated with the same exact options as the previous toolbar, a few of the buttons would overlap during the transition and be forced into the overflow menu. To fix this, I memoized the toolbar actions and implemented a 100 ms debounce for the transition.
Updated by Peter Amstutz 3 months ago
- File regular-user-frozen-project-missing-share-and-unfreeze.png regular-user-frozen-project-missing-share-and-unfreeze.png added
- File regular-user-all-processes-missing-write-options.png regular-user-all-processes-missing-write-options.png added
✅ Regular user, read-only project in "Shared with me".
✅ Regular user, read-only project in "Favorite". This is probably the same bug as previous.
✅ Regular user, frozen project in "Shared with me" without manage access (but see below when the user does have manage access)
✅ Project within a read-only project.
✅ Workflow run within a read-only project.
✅ Workflow run within a read-only project, viewed in "All processes".
✅ Project in a project with write access.
✅ Collection in a project with write access.
However I found a couple of corner cases that are still not right.
Regular user, frozen project. User does have manage access. User should have the "share" and "un-freeze" icons. The context menu has the same problem.
For sharing: if the user has manage access (or is an admin), the "Share" icon should always be available on projects.
For unfreeze: the logic is (if the user is an admin) OR (user has manage permission AND API.UnfreezeProjectRequiresAdmin === false)
Regular user, all processes view. The container request is writable (user can write to the parent project), so "Edit" and "Remove" icons should be present. They are present in the context menu, but not the toolbar.
Updated by Peter Amstutz 3 months ago
Another thing: as a regular user, the "Groups" table is using the project toolbar instead of the role group toolbar (not shown here, but for read-only groups it uses the read-only project toolbar). The context menu is correct has the correct operations.
Updated by Lisa Knox 3 months ago
22235-toolbar-access-fixes @ 03763baac17807d033414ab999437b8c1e53f20c
developer-run-tests-services-workbench2: #1337
✅ Regular user, frozen project. User should have the "share" and "un-freeze" icons. The context menu has the same problem.
✅ For sharing: if the user has manage access (or is an admin), the "Share" icon should always be available on projects.
✅ For unfreeze: the logic is (if the user is an admin) OR (user has manage permission AND API.UnfreezeProjectRequiresAdmin === false)
✅ Regular user, all processes view. The container request is writable (user can write to the parent project), so "Edit" and "Remove" icons should be present. They are present in the context menu, but not the toolbar.
Notes:- It is worth considering that a refactor of the menu item selection process is already planned, in which many of the fixes on this branch will be obsolete or overwritten.
Updated by Peter Amstutz 3 months ago
process-middleware-service.ts:56
select: [...containerRequestFieldsNoMounts, "canWrite", "canManage"],
This should be can_write
and can_manage
But there's a second problem:
const params = this.getParams(api, dataExplorer); // Get items if (params !== null) { const containerRequests = await this.services.groupsService.contents('', { ...this.getParams(api, dataExplorer), select: containerRequestFieldsNoMounts.concat(containerFieldsNoMounts) });
It's replacing the select
field so the can_write
and can_manage
still don't get sent in the actual query.
Updated by Peter Amstutz 3 months ago
Also, as noted on matrix, looks like you missed note-11 about the Groups toolbar.
Updated by Lisa Knox 3 months ago
22235-toolbar-access-fixes @ 2cbfdab7bb07950b953d99713c77a998b2c024df
developer-run-tests-services-workbench2: #1339
But there's a second problem...
I had fixed this elsewhere but then made these change to pass e2e tests. I then neglected to make sure the result was the same, but it's fixed now.
Groups table now shows proper toolbar menu.
Ticket #22276 was created as a follow-up
Updated by Lisa Knox 3 months ago
- Status changed from In Progress to Resolved
Applied in changeset arvados|49ccf7fdcb5ef364ec43bcd09be2c8ccf165df50.