-
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-12049] Remove usage of ActiveUserState from folder service #11880
base: main
Are you sure you want to change the base?
Conversation
…tate Added extra test cases for encrypted folder and decrypted folders Updated derived state to use decrypt with key
New Issues
Fixed Issues
|
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #11880 +/- ##
=======================================
Coverage 33.41% 33.42%
=======================================
Files 2841 2841
Lines 89008 89048 +40
Branches 16979 16990 +11
=======================================
+ Hits 29744 29762 +18
- Misses 56927 56947 +20
- Partials 2337 2339 +2 ☔ View full report in Codecov by Sentry. |
return []; | ||
} | ||
|
||
const decryptFolderPromises = folders.map((f) => f.decryptWithKey(userKey, encryptService)); |
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.
ℹ️ @bitwarden/team-platform-dev changed folder decryption to use decryptWithKey
instead of the decrypt
method.
|
||
folders$(userId$: Observable<UserId>): Observable<Folder[]> { | ||
return userId$.pipe( | ||
takeWhile((userId) => userId != null), |
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.
ℹ️ takeWhile
operator to stop folder state observations when userId becomes invalid (during logout)
this.folderViews$ = this.decryptedFoldersState.state$; | ||
folderViews$(userId$: Observable<UserId>): Observable<FolderView[]> { | ||
return userId$.pipe( | ||
takeWhile((userId) => userId != null), |
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.
ℹ️ takeWhile
operator to stop folder state observations when userId becomes invalid (during logout)
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-12049
📔 Objective
ActiveUserState
is being deprecated. Remove usage fromfolderService
and require userId to be passed.📸 Screenshots
⏰ 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