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-13348] Browser Extension impacts on Free Bitwarden Family Policy #12073

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

Conversation

cyprain-okeke
Copy link
Contributor

🎟️ Tracking

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

📔 Objective

Given the users email address is only associated with 1 enterprise organization, when the policy is turned on, then hide the Free Bitwarden Families page from the navigation in the updated extension navigation (Settings > About > More from Bitwarden)

Design: Extension refresh

📸 Screenshots

⏰ 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

@cyprain-okeke cyprain-okeke requested a review from a team as a code owner November 20, 2024 21:19
Copy link

codecov bot commented Nov 20, 2024

Codecov Report

Attention: Patch coverage is 0% with 26 lines in your changes missing coverage. Please review.

Project coverage is 33.46%. Comparing base (f484228) to head (2159760).

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...ps/browser/src/services/families-policy.service.ts 0.00% 17 Missing ⚠️
...bout-page/more-from-bitwarden-page-v2.component.ts 0.00% 4 Missing ⚠️
...s/about-page/more-from-bitwarden-page.component.ts 0.00% 4 Missing ⚠️
...rc/admin-console/services/policy/policy.service.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12073      +/-   ##
==========================================
- Coverage   33.47%   33.46%   -0.02%     
==========================================
  Files        2875     2876       +1     
  Lines       89830    89856      +26     
  Branches    17102    17106       +4     
==========================================
- Hits        30075    30068       -7     
- Misses      57379    57412      +33     
  Partials     2376     2376              

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


🚨 Try these New Features:

Copy link
Contributor

github-actions bot commented Nov 20, 2024

Logo
Checkmarx One – Scan Summary & Details1bb7dc08-5aa3-4f6c-8d1a-7628a72f5d75

Fixed Issues

Severity Issue Source File / Package
LOW Client_JQuery_Deprecated_Symbols /apps/cli/src/service-container/service-container.ts: 876

@djsmith85 djsmith85 self-requested a review November 21, 2024 11:54
Comment on lines 51 to 52
(organizations) => organizations.filter((org) => org.canManageSponsorships).length === 1,
),
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 Is it more defensive to test === 1 or >=1 here? Same applies to line 58.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are considering only when there is 1 enterprise organization, and when the policy is turned on

map((organizations) => organizations.filter((org) => org.canManageSponsorships)),
switchMap((enterpriseOrgs) => {
if (enterpriseOrgs.length === 1) {
const enterpriseOrgId = enterpriseOrgs[0].id;
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 This seems incorrect. Shouldn't you check all enterprise orgs? If not, document why the first one is the one you should always check.

),
);

this.isFreeFamilyPolicyEnabled$ = this.organizationService.getAll$().pipe(
Copy link
Contributor

Choose a reason for hiding this comment

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

🤔 This code is duplicated across multiple components. That indicates to me that it should be encapsulated within a service.

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.

2 participants