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-17120] account deprovisioning banner #13097

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

Conversation

BTreston
Copy link
Contributor

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-17120
https://bitwarden.atlassian.net/browse/PM-17151

📔 Objective

This PR adds a new banner to display to owners and admins that they may now delete member accounts that belong to a claimed domain. Also addresses subtask to remove the Provider banner.

📸 Screenshots

Screen.Recording.2025-01-27.at.3.09.01.PM.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

@BTreston BTreston requested review from a team as code owners January 27, 2025 20:18
Copy link
Contributor

github-actions bot commented Jan 27, 2025

Logo
Checkmarx One – Scan Summary & Detailsc0b90e64-b277-47fd-814f-86c7e7aa1ca8

New Issues (3)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-apps-dialog.component.html: 15
detailsMethod at line 15 of /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-apps-dialog.component.html sends user information ou...
Attack Vector
MEDIUM Client_Privacy_Violation /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-members-dialog.component.html: 15
detailsMethod at line 15 of /bitwarden_license/bit-web/src/app/tools/access-intelligence/org-at-risk-members-dialog.component.html sends user information...
Attack Vector
LOW Client_Use_Of_Iframe_Without_Sandbox /apps/browser/src/autofill/content/notification-bar.ts: 872
detailsThe application employs an HTML iframe at whose contents are not properly sandboxed
Attack Vector
Fixed Issues (8)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/username-generator.component.html: 3
MEDIUM Client_Privacy_Violation /libs/tools/generator/components/src/credential-generator-history.component.html: 3
MEDIUM Client_Privacy_Violation /libs/vault/src/components/password-history-view/password-history-view.component.html: 6
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/password-generator-history.component.html: 11
MEDIUM Client_Privacy_Violation /apps/web/src/app/tools/password-generator-history.component.html: 11
MEDIUM Client_Privacy_Violation /libs/vault/src/components/password-history-view/password-history-view.component.html: 6
MEDIUM Client_Privacy_Violation /libs/components/src/color-password/color-password.component.ts: 31
LOW Client_Use_Of_Iframe_Without_Sandbox /apps/browser/src/autofill/content/notification-bar.ts: 881

Copy link

codecov bot commented Jan 27, 2025

Codecov Report

Attention: Patch coverage is 70.37037% with 8 lines in your changes missing coverage. Please review.

Project coverage is 35.39%. Comparing base (da422fd) to head (2c13618).
Report is 17 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...nizations/layouts/organization-layout.component.ts 37.50% 4 Missing and 1 partial ⚠️
.../services/account-deprovisioning-banner.service.ts 87.50% 1 Missing and 1 partial ⚠️
...in-console/providers/providers-layout.component.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #13097      +/-   ##
==========================================
+ Coverage   35.28%   35.39%   +0.10%     
==========================================
  Files        2997     3010      +13     
  Lines       90871    91183     +312     
  Branches    16966    17000      +34     
==========================================
+ Hits        32067    32275     +208     
- Misses      56316    56400      +84     
- Partials     2488     2508      +20     

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


async hideBanner(organization: Organization) {
await this._showBanner.update((state) => {
if (!state) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add tests here. Abstracting this into a pure function will reduce test setup effort.

(state) => {
      if (!state) {
        state = [organization.id];
      } else if (!state.includes(organization.id)) {
        state.push(organization.id);
      }
      return state;
    }

Copy link
Contributor

@JimmyVo16 JimmyVo16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good. Just one suggestion.

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.

3 participants