-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-26361] Add User Auto Confirmation #6436
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
base: main
Are you sure you want to change the base?
Conversation
New Issues (3)Checkmarx found the following issues in this Pull Request
|
There was a problem hiding this 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
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
…onse models. Updating sprocs and views. Updating migrations
There was a problem hiding this 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!
There was a problem hiding this 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] |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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
src/Sql/dbo/Tables/Organization.sql
Outdated
[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), |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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] |
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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]'; |
There was a problem hiding this comment.
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]';
🎟️ 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

⏰ Reminders before review
🦮 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