Skip to content

Conversation

jrmccannon
Copy link
Contributor

@jrmccannon jrmccannon commented Oct 9, 2025

🎟️ Tracking

PM-26361

📔 Objective

This adds AutomaticUserConfirmation to Organization, OrganizationAbility, OrganizationLicense, and Plan. This also adds it to the Admin portal as a checkable box for Organization features. This also adds the feature to the claims factory and claim constant.

📸 Screenshots

Admin Portal Checkbox
image

⏰ 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

Copy link
Contributor

github-actions bot commented Oct 9, 2025

Logo
Checkmarx One – Scan Summary & Detailsaa225de5-c039-44ec-a0b8-255835c5cfd1

New Issues (3)

Checkmarx found the following issues in this Pull Request

Severity Issue Source File / Package Checkmarx Insight
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1526
detailsMethod at line 1526 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
ID: QoPFIn33sdQMftvYHIrA5m2sTvA%3D
Attack Vector
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1407
detailsMethod at line 1407 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
ID: BckEUZHi2Zah%2BqUsgB4HvfICDBw%3D
Attack Vector
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 251
detailsMethod at line 251 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows t...
ID: ywF7SV4TBXJ5%2BlPTW0fv0uKgRzc%3D
Attack Vector
Fixed Issues (1)

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

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 299

Copy link
Contributor

@r-tome r-tome left a comment

Choose a reason for hiding this comment

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

Looking at the documentation this is missing some updates:

Add the new column to the following sprocs and views:
Organization_Create.sql
Organization_ReadAbilities.sql
Organization_Update.sql
OrganizationUserOrganizationDetailsView.sql
ProviderUserProviderOrganizationDetailsView.sql

Add the new property to the following models:
src/Api/AdminConsole/Models/Response/Organizations/OrganizationResponseModel.cs
src/Api/AdminConsole/Models/Response/ProfileOrganizationResponseModel.cs
src/Api/AdminConsole/Models/Response/ProfileProviderOrganizationResponseModel.cs
src/Core/AdminConsole/Models/Data/Organizations/OrganizationUsers/OrganizationUserOrganizationDetails.cs
src/Core/AdminConsole/Models/Data/Provider/ProviderUserOrganizationDetails.cs

Copy link

codecov bot commented Oct 10, 2025

Codecov Report

❌ Patch coverage is 68.96552% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.88%. Comparing base (42568b6) to head (8127de9).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
...AdminConsole/Views/Shared/_OrganizationForm.cshtml 0.00% 3 Missing ⚠️
...illing/Organizations/Models/OrganizationLicense.cs 50.00% 3 Missing ⚠️
...Admin/AdminConsole/Models/OrganizationEditModel.cs 33.33% 2 Missing ⚠️
...mplementations/OrganizationLicenseClaimsFactory.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6436      +/-   ##
==========================================
+ Coverage   50.73%   54.88%   +4.15%     
==========================================
  Files        1866     1866              
  Lines       82705    82722      +17     
  Branches     7310     7321      +11     
==========================================
+ Hits        41961    45404    +3443     
+ Misses      39143    35639    -3504     
- Partials     1601     1679      +78     

☔ 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.

…onse models. Updating sprocs and views. Updating migrations
@jrmccannon jrmccannon requested a review from r-tome October 10, 2025 14:49
@jrmccannon jrmccannon marked this pull request as ready for review October 13, 2025 16:41
@jrmccannon jrmccannon requested review from a team as code owners October 13, 2025 16:41
Copy link
Collaborator

@sbrown-livefront sbrown-livefront 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!

Copy link

@mkincaid-bw mkincaid-bw left a comment

Choose a reason for hiding this comment

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

Mostly nit-picks and one concern about refreshing views.


UPDATE
[dbo].[Organization]
UPDATE [dbo].[Organization]

Choose a reason for hiding this comment

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

⛏️ The UPDATE and table name should be on their own lines

[Id] = @Id
[SyncSeats] = @SyncSeats,
[UseAutomaticUserConfirmation] = @UseAutomaticUserConfirmation
WHERE [Id] = @Id;

Choose a reason for hiding this comment

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

⛏️ The WHERE and column name(s) should be on their own lines

[UseOrganizationDomains] BIT NOT NULL CONSTRAINT [DF_Organization_UseOrganizationDomains] DEFAULT (0),
[UseAdminSponsoredFamilies] BIT NOT NULL CONSTRAINT [DF_Organization_UseAdminSponsoredFamilies] DEFAULT (0),
[SyncSeats] BIT NOT NULL CONSTRAINT [DF_Organization_SyncSeats] DEFAULT (0),
[UseAutomaticUserConfirmation] BIT NOT NULL CONSTRAINT [DF_Organization_UseAutomaticUserConfirmation] DEFAULT (0),

Choose a reason for hiding this comment

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

⛏️ The BIT data type should be vertically aligned with the one above it.

Choose a reason for hiding this comment

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

⛏️ All if your file names have AddAutoConfrimUser instead of AddAutoConfirmUser

Copy link
Contributor Author

Choose a reason for hiding this comment

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

😭

BEGIN
SET NOCOUNT ON

UPDATE [dbo].[Organization]

Choose a reason for hiding this comment

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

⛏️ The UPDATE and table name should be on their own lines

[UseAdminSponsoredFamilies] = @UseAdminSponsoredFamilies,
[SyncSeats] = @SyncSeats,
[UseAutomaticUserConfirmation] = @UseAutomaticUserConfirmation
WHERE [Id] = @Id;

Choose a reason for hiding this comment

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

⛏️ The WHERE and column name(s) should be on their own lines

[dbo].[Provider] P ON P.[Id] = PU.[ProviderId]
GO

EXEC sp_refreshview '[dbo].[OrganizationView]';

Choose a reason for hiding this comment

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

Any view that touches a modified table should be refreshed (regardless if they are using the new columns). Since you modified two, those are fine, but these should also be refreshed:

EXEC sp_refreshview '[dbo].[OrganizationCipherDetailsCollectionsView]';
EXEC sp_refreshview '[dbo].[ProviderOrganizationOrganizationDetailsView]';

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.

4 participants