-
Notifications
You must be signed in to change notification settings - Fork 866
[PM-15970] Allow assigning collections if user has correct permissions #4461
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-15970] Allow assigning collections if user has correct permissions #4461
Conversation
No New Or Fixed Issues Found |
5ac1b7c
to
b695954
Compare
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.
@dseverns-livefront @david-livefront This seemed like the best package for the enum, but I'm open to suggestion if there's a more appropriate place.
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.
makes sense to me, another thought I had was: if we are not using this outside the extensions it could live in that file and maybe annotate with @VisibleForTesting
so if we were to try and use it outside there or the test we get a lint warning, but that may be more philosophical.
TLDR: Placement makes sense to me.
app/src/main/java/com/x8bit/bitwarden/ui/vault/feature/util/CollectionViewExtensions.kt
Outdated
Show resolved
Hide resolved
readOnly && hidePasswords -> CollectionPermission.VIEW_EXCEPT_PASSWORDS | ||
readOnly -> CollectionPermission.VIEW | ||
!readOnly && hidePasswords -> CollectionPermission.EDIT_EXCEPT_PASSWORD | ||
// !readOnly is the only other possible condition, which resolves to EDIT permission |
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.
👍
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.
Just a small typo and a visibility option. But otherwise LGTM!
b695954
to
ed2e234
Compare
Allows assigning items to collections if the user has manage permissions and is not restricted from viewing or editing password in the collection. This fixes an issue where collection assignment would be blocked if the user could view the item and its passwords.
ed2e234
to
5f9ca1a
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4461 +/- ##
==========================================
- Coverage 88.91% 88.91% -0.01%
==========================================
Files 455 455
Lines 39558 39568 +10
Branches 5605 5614 +9
==========================================
+ Hits 35173 35180 +7
Misses 2428 2428
- Partials 1957 1960 +3 ☔ View full report in Codecov by Sentry. |
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.
🎟️ Tracking
PM-15970
PM-15969
📔 Objective
Allows assigning items to collections if the user has manage permissions and is not restricted from viewing or editing password in the collection. This fixes an issue where collection assignment would be blocked if the user could view the item and its passwords.
📸 Screenshots
Coming soon!
⏰ 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 confirmedissue 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