[PM-40514] Add UseRiskInsights Org ability check in all Access Intelligence v1 endpoints - #8258
Open
lastbestdev wants to merge 6 commits into
Open
[PM-40514] Add UseRiskInsights Org ability check in all Access Intelligence v1 endpoints #8258lastbestdev wants to merge 6 commits into
lastbestdev wants to merge 6 commits into
Conversation
Contributor
|
Claude Code is reviewing this pull request... If this comment does not update with results, check the Actions log. |
lastbestdev
commented
Aug 25, 2026
| return Ok(response); | ||
| } | ||
|
|
||
| private async Task AuthorizeAsync(Guid organizationId) |
Contributor
Author
There was a problem hiding this comment.
Note: all the same logic here, just moved private methods to the bottom of file to improve order
lastbestdev
commented
Aug 26, 2026
Comment on lines
-136
to
-159
| /// <summary> | ||
| /// Adds a new record into PasswordHealthReportApplication | ||
| /// </summary> | ||
| /// <param name="request">A single instance of PasswordHealthReportApplication Model</param> | ||
| /// <returns>A single instance of PasswordHealthReportApplication</returns> | ||
| /// <exception cref="BadRequestException">If the organization Id is not valid</exception> | ||
| /// <exception cref="NotFoundException">If the user lacks access</exception> | ||
| [HttpPost("password-health-report-application")] | ||
| public async Task<PasswordHealthReportApplication> AddPasswordHealthReportApplication( | ||
| [FromBody] PasswordHealthReportApplicationModel request) | ||
| { | ||
| if (!await _currentContext.AccessReports(request.OrganizationId)) | ||
| { | ||
| throw new NotFoundException(); | ||
| } | ||
|
|
||
| var commandRequest = new AddPasswordHealthReportApplicationRequest | ||
| { | ||
| OrganizationId = request.OrganizationId, | ||
| Url = request.Url | ||
| }; | ||
|
|
||
| return await _addPwdHealthReportAppCommand.AddPasswordHealthReportApplicationAsync(commandRequest); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Note: this endpoint is removed as it is never called in the clients codebase. Only the endpoint for adding multiple critical applications at once is in use
AlexRubik
approved these changes
Aug 26, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #8258 +/- ##
==========================================
+ Coverage 63.35% 63.38% +0.03%
==========================================
Files 2429 2429
Lines 104830 104825 -5
Branches 9505 9504 -1
==========================================
+ Hits 66416 66447 +31
+ Misses 36137 36102 -35
+ Partials 2277 2276 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-40514
📔 Objective
The request Organization must have the
UseRiskInsightsability set to true in order to use Access Intelligence features. Some of the v1 endpoints were not checking this ability properly, and are patched in these changes.One of the old v1 endpoints is removed, as it is not called anywhere by the
clientscodebase.📸 Screenshots
N/A