Skip to content

PM-31923 adding the whole report endpoints v2#7228

Open
prograhamming wants to merge 109 commits intomainfrom
dirt/pm-31923-whole-report-data-v2-endpoints-access-intelligence
Open

PM-31923 adding the whole report endpoints v2#7228
prograhamming wants to merge 109 commits intomainfrom
dirt/pm-31923-whole-report-data-v2-endpoints-access-intelligence

Conversation

@prograhamming
Copy link
Contributor

🎟️ Tracking

This is a PR for user story PM-31923

📔 Objective

Creating new V2 endpoints for read and update operations on the whole report in the database. This will also include the logic for saving a reportData file in Azure Blob storage and server if self-hosted.

Documentation: PM-31923_AccessIntelligence_V2_Server_Docs.md

📸 Screenshots

prograhamming and others added 30 commits February 25, 2026 08:44
…elligence' of github.com:bitwarden/server into dirt/PM-31923-whole-report-data-v2-endpoints-access-intelligence
…elligence' of github.com:bitwarden/server into dirt/PM-31923-whole-report-data-v2-endpoints-access-intelligence
* refactor(billing): update seat logic

* test(billing): update tests for seat logic
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* Return WebAuthn credential record in create response

* Make CreateWebAuthnLoginCredentialCommand null-safe
…#7123)

* Remove emergency access from all organization users on policy enable, or when accepted/restored

* Use correct policy save system

* Add additional tests

* Implement both PreUpsert and OnSave side effects
* Add coupon support to invoice preview and subscription creation

* Fix the build lint error

* Resolve the initial review comments

* fix  the failing test

* fix the build lint error

* Fix the failing test

* Resolve the unaddressed issues

* Fixed the deconstruction error

* Fix the lint issue

* Fix the lint error

* Fix the lint error

* Fix the build lint error

* lint error resolved

* remove the setting file

* rename the variable name  validatedCoupon

* Remove the owner property

* Update OrganizationBillingService tests to align with recent refactoring

- Remove GetMetadata tests as method no longer exists
- Remove Owner property references from OrganizationSale (removed in d761336)
- Update coupon validation to use SubscriptionDiscountRepository instead of SubscriptionDiscountService
- Add missing imports for SubscriptionDiscount entities
- Rename test for clarity: Finalize_WithNullOwner_SkipsValidation → Finalize_WithCouponOutsideDateRange_IgnoresCouponAndProceeds

All tests passing (14/14)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix the lint error

* Making the owner non nullable

* fix the failing unit test

* Make the owner nullable

* Fix the bug for coupon in Stripe with no audience restrictions(PM-32756)

* Return validation message for invalid coupon

* Update the valid token message

* Fix the failing unit test

* Remove the duplicate method

* Fix the failing build and test

* Resolve the failing test

* Add delete of invalid coupon

* Add the expired error message

* Delete on invalid coupon in stripe

* Fix the lint errors

* return null if we get exception from stripe

* remove the auto-delete change

* fix the failing test

* Fix the lint build error

---------

Co-authored-by: Claude <noreply@anthropic.com>
feat: add MasterPasswordSalt column to User table

- Add MasterPasswordSalt column to User table in both Dapper and EF implementations
- Update User stored procedures (Create, Update, UpdateMasterPassword) to handle salt column
- Add EF migrations and update UserView with dependent views
- Set MaxLength constraint on MasterPasswordSalt column
- Update UserRepository implementations to manage salt field
- Add comprehensive test coverage for salt handling and normalization
…elligence' of github.com:bitwarden/server into dirt/PM-31923-whole-report-data-v2-endpoints-access-intelligence
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

Logo
Checkmarx One – Scan Summary & Details1f1bf208-c9b0-4c42-89c1-095547778904


Fixed Issues (4) Great job! The following issues were fixed in this Pull Request
Severity Issue Source File / Package
MEDIUM CSRF /src/Api/Dirt/Controllers/OrganizationReportsController.cs: 189
MEDIUM CSRF /src/Api/Dirt/Controllers/OrganizationReportsController.cs: 233
MEDIUM CSRF /src/Api/Dirt/Controllers/OrganizationReportsController.cs: 286
MEDIUM CSRF /src/Api/Dirt/Controllers/OrganizationReportsController.cs: 189

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 76.17729% with 172 lines in your changes missing coverage. Please review.
✅ Project coverage is 61.80%. Comparing base (a7259df) to head (80e7aea).

Files with missing lines Patch % Lines
.../Dirt/Controllers/OrganizationReportsController.cs 60.88% 80 Missing and 8 partials ⚠️
.../Services/AzureOrganizationReportStorageService.cs 36.58% 51 Missing and 1 partial ⚠️
.../Services/LocalOrganizationReportStorageService.cs 81.35% 10 Missing and 1 partial ⚠️
...SharedWeb/Utilities/ServiceCollectionExtensions.cs 27.27% 6 Missing and 2 partials ⚠️
...s/Services/NoopOrganizationReportStorageService.cs 0.00% 6 Missing ⚠️
...eportFeatures/UpdateOrganizationReportV2Command.cs 95.87% 3 Missing and 1 partial ⚠️
...rts/ReportFeatures/AddOrganizationReportCommand.cs 0.00% 0 Missing and 1 partial ⚠️
.../ReportFeatures/CreateOrganizationReportCommand.cs 98.43% 0 Missing and 1 partial ⚠️
...ortFeatures/UpdateOrganizationReportDataCommand.cs 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7228      +/-   ##
==========================================
+ Coverage   57.62%   61.80%   +4.18%     
==========================================
  Files        2032     2048      +16     
  Lines       89517    90128     +611     
  Branches     7974     8024      +50     
==========================================
+ Hits        51587    55707    +4120     
+ Misses      36071    32469    -3602     
- Partials     1859     1952      +93     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@prograhamming
Copy link
Contributor Author

@claude review this PR

@claude
Copy link
Contributor

claude bot commented Mar 16, 2026

Claude finished @prograhamming's task in 9m 34s —— View job


I'll analyze this and get back to you.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review

Projects

None yet

Development

Successfully merging this pull request may close these issues.