-
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-17168] Sync organization user revoked/restored status immediately via push notification #13101
base: main
Are you sure you want to change the base?
[PM-17168] Sync organization user revoked/restored status immediately via push notification #13101
Conversation
…wait for reconnect
… in a separate method
…diately-via-push-notification
…OrgKeysOnRevokeRestore
Fixed Issues (1)Great job! The following issues were fixed in this Pull Request
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13101 +/- ##
=======================================
Coverage 35.41% 35.42%
=======================================
Files 3007 3007
Lines 90716 90722 +6
Branches 16858 16859 +1
=======================================
+ Hits 32129 32140 +11
+ Misses 56123 56118 -5
Partials 2464 2464 ☔ View full report in Codecov by Sentry. |
I'm closing this because only the server change is required. |
…diately-via-push-notification
Reopening this PR — @eliykat explained that we need to refresh the identity token to update the claims. |
@@ -182,6 +187,9 @@ export class DefaultNotificationsService implements NotificationsServiceAbstract | |||
await this.syncService.fullSync(true); | |||
break; | |||
case NotificationType.SyncOrgKeys: | |||
if (await this.configService.getFeatureFlag(FeatureFlag.PushSyncOrgKeysOnRevokeRestore)) { | |||
await this.apiService.refreshIdentityToken(); |
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 think a comment here would be useful, e.g. // refresh identity token to update organization roles in the JWT claims
.
…diately-via-push-notification
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-17168
📔 Objective
This PR updates the
NotificationsService
to handle messages of typeNotificationType.SyncOrgKeys
by refreshing the identity token.I also noticed that the SignalR connection stops when receiving a
NotificationType.SyncOrgKeys
message but does not restart automatically. To fix this, I updated the reconnect method to re-setup the connection.Server PR.
📸 Screenshots
Revoking and restoring a user a couple of times:
Screen.Recording.2025-01-28.at.12.41.05.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