Skip to content
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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

r-tome
Copy link
Contributor

@r-tome r-tome commented Jan 28, 2025

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-17168

📔 Objective

Revoking/restoring user is not synced immediately via push notification

This PR updates the NotificationsService to handle messages of type NotificationType.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

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

@r-tome r-tome changed the title [PM17168] Sync organization user revoked/restored status immediately via push notification [PM-17168] Sync organization user revoked/restored status immediately via push notification Jan 28, 2025
@r-tome r-tome requested review from a team and BTreston January 28, 2025 12:51
Copy link
Contributor

github-actions bot commented Jan 28, 2025

Logo
Checkmarx One – Scan Summary & Detailsdf947f5e-acf3-42c3-bf5e-7ee62c7f5a5d

Great job, no security vulnerabilities found in this Pull Request

Copy link

codecov bot commented Jan 28, 2025

Codecov Report

Attention: Patch coverage is 5.88235% with 16 lines in your changes missing coverage. Please review.

Project coverage is 35.28%. Comparing base (582beaf) to head (ff7eef9).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
libs/common/src/services/notifications.service.ts 0.00% 16 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13101      +/-   ##
==========================================
- Coverage   35.29%   35.28%   -0.02%     
==========================================
  Files        2997     2997              
  Lines       90882    90891       +9     
  Branches    16969    16971       +2     
==========================================
- Hits        32080    32074       -6     
- Misses      56314    56329      +15     
  Partials     2488     2488              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@r-tome r-tome marked this pull request as ready for review January 28, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant