-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PM-11162] Assign To Collections Permission Update #11367
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11367 +/- ##
==========================================
- Coverage 35.39% 35.39% -0.01%
==========================================
Files 3009 3009
Lines 90783 90807 +24
Branches 16868 16876 +8
==========================================
+ Hits 32137 32144 +7
- Misses 56182 56199 +17
Partials 2464 2464 ☔ View full report in Codecov by Sentry. |
Great job, no security vulnerabilities found in this Pull Request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change to vault-items
looks good!
However, we need to make a similar change to the item-details-section.component
for the new CipherForm. It also allows users to modify a cipher's collections without the "Assign To Collections" dialog so we need to adjust that component to disable the collections control when !cipher.viewPassword
return org.id === this.originalCipherView.organizationId; | ||
}); | ||
|
||
const filteredCollections = this.originalCipherView.collectionIds.find((id) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.originalCipherView
can be null when creating a new cipher and this will throw.
filteredCollections?.length > 0 || | ||
(this.originalCipherView.edit && this.originalCipherView.viewPassword) | ||
) { | ||
this.showCollectionsControl = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts
Show resolved
Hide resolved
…ot remove assign to collections based on permissions
libs/angular/src/admin-console/components/collections.component.ts
Outdated
Show resolved
Hide resolved
if (cipher?.organizationId == null) { | ||
this.canAssignCollections = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't follow this - if the cipher isn't in an organization, you can't assign it to a collection.
libs/angular/src/admin-console/components/collections.component.ts
Outdated
Show resolved
Hide resolved
libs/angular/src/admin-console/components/collections.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to go! There do seem to be a couple merge conflicts though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're most recent changes look good 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
🎟️ Tracking
PM-11162
📔 Objective
Only users with
Can Edit
permissions will be allowed toAssign To Collections
. If the user hasCan Edit Except Password
they should not seeAssign To Collections
in the menu of the item row.UPDATE:
After speaking with product and design we have decided to move away from hiding
Can Edit Except Passwords
collections from the dropdown.If an item belongs to only a
Can Edit Except Passwords
collection, the user will not see theAssign to Collections
action in the item row menu, and the collections dropdown will be disabledIf an item belongs to multiple collections with a higher permission (e.g. item is in
Can Edit Except Password
andCan Manage
) the user will see theAssign to Collections
action, and the collections dropdown in the edit modal will show all available collections📸 Screen Recording
PM-11162.mov
Desktop Permissions
PM-11162-Desktop.mov
Screenshot of CLI error when trying to add collection to
Can Edit Except PW
item UPDATED (shows new error text)Removed Assign option from
Can Edit Except PW
items in browserPM-14165-browser-assign-remove.mov
Recording of Collections dropdown disable for item with only
Can Edit Except PW
. And dropdown available for item with multiple collections including aManage/Edit
permission.PM-11162-edit-except-pw-PM-AC.mov
Recording for PM-17390 - When Owners/Admin Access setting is turned on, disable collection options in PM for Owners if they do not have
Edit/Manage
permissionsScreen.Recording.2025-01-27.at.11.14.53.AM.mov
Recording for PM-17390 - Custom User Flow in PM
PM-17390-custom-user-collection-edit-except-pw-check.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes