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-17465] refactor PolicyService.getAll$ to make userId not optional #13031

Merged
merged 4 commits into from
Jan 24, 2025

Conversation

BTreston
Copy link
Contributor

🎟️ Tracking

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

📔 Objective

Fixes an issue where the PolicyService.getAll$ accepts an optional userId param that is passed to the OrganizationService call that requires a userId, resulting in cases where we pass undefined to the OrganizationService call.

📸 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

@BTreston BTreston requested review from a team as code owners January 23, 2025 15:58
@BTreston BTreston requested a review from r-tome January 23, 2025 15:58
Copy link
Contributor

github-actions bot commented Jan 23, 2025

Logo
Checkmarx One – Scan Summary & Details77f2d436-b2df-4340-864a-cc0ebdba5573

Great job, no security vulnerabilities found in this Pull Request

r-tome
r-tome previously approved these changes Jan 23, 2025
Copy link
Contributor

@amorask-bitwarden amorask-bitwarden left a comment

Choose a reason for hiding this comment

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

Billing changes look good, thank you.

@BTreston BTreston dismissed stale reviews from amorask-bitwarden and r-tome via 0b3bb89 January 23, 2025 18:52
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

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

Project coverage is 35.10%. Comparing base (caf3e77) to head (906a280).
Report is 18 commits behind head on main.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...-form/components/options/send-options.component.ts 0.00% 6 Missing ⚠️
...p/billing/settings/sponsoring-org-row.component.ts 37.50% 5 Missing ⚠️
libs/angular/src/tools/send/add-edit.component.ts 0.00% 3 Missing ⚠️
...p/billing/services/free-families-policy.service.ts 33.33% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             main   #13031    +/-   ##
========================================
  Coverage   35.10%   35.10%            
========================================
  Files        2990     3000    +10     
  Lines       91078    91332   +254     
  Branches    17052    17095    +43     
========================================
+ Hits        31974    32065    +91     
- Misses      56611    56762   +151     
- Partials     2493     2505    +12     

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

Copy link
Member

@eliykat eliykat left a comment

Choose a reason for hiding this comment

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

This makes a nice start on removing activeUserState from this service :D

@BTreston BTreston requested a review from eliykat January 24, 2025 02:25
Copy link
Member

@eliykat eliykat left a comment

Choose a reason for hiding this comment

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

Much nicer, thanks!

Copy link
Contributor

@djsmith85 djsmith85 left a comment

Choose a reason for hiding this comment

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

Approving for Tools

@BTreston BTreston merged commit b23a41a into main Jan 24, 2025
86 checks passed
@BTreston BTreston deleted the ac/pm-17465-fix-userId-being-undefined branch January 24, 2025 14:58
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.

5 participants