- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1.5k
[SM-1570] Adding new item to organization license to disable SM ads for users #6482
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 
 | 
…warden/server into SM-1571-DisableSMAdsForUsers
| Codecov Report❌ Patch coverage is  Additional details and impacted files@@            Coverage Diff             @@
##             main    #6482      +/-   ##
==========================================
+ Coverage   51.75%   55.73%   +3.98%     
==========================================
  Files        1901     1901              
  Lines       84073    84092      +19     
  Branches     7507     7507              
==========================================
+ Hits        43509    46871    +3362     
+ Misses      38872    35452    -3420     
- Partials     1692     1769      +77     ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
 | 
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.
looks good
| Claude finished @cd-bitwarden's task —— View job Code Review Complete ✓I've completed a comprehensive review of PR #6482. This PR adds a new feature flag  Summary of ChangesThis PR systematically adds the  
 Critical Issues🔴 Missing License ConstantLocation:  The constant  Evidence: 
 Impact: Low severity but violates consistency patterns. While functional, it doesn't follow the established pattern of using constants throughout the license system. 🔴 License Version Not UpdatedLocation:  The  Version = version.GetValueOrDefault(CurrentLicenseFileVersion); // TODO: Remember to change the constantAnalysis: 
 Conclusion: This is intentionally correct ✓ - the version doesn't need to increment because this is a claims-only field. However, the TODO comment at line 58 is misleading and should be clarified or removed to prevent confusion in future reviews. Recommendation: Add a comment near line 233 explaining that  Suggested Improvements
 | 
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.
Additional refresh statements needed, plus a question regarding casing.
| GO | ||
|  | ||
| -- Refresh view | ||
| EXEC sp_refreshsqlmodule N'[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.
When updating a table, all views that reference the table should be refreshed, even if they are not using the new column:
EXEC sp_refreshview N'[dbo].[OrganizationCipherDetailsCollectionsView]';
EXEC sp_refreshview N'[dbo].[OrganizationUserOrganizationDetailsView]';
EXEC sp_refreshview N'[dbo].[OrganizationView]';
EXEC sp_refreshview N'[dbo].[ProviderOrganizationOrganizationDetailsView]';
EXEC sp_refreshview N'[dbo].[ProviderUserProviderOrganizationDetailsView]';| [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), | ||
| [UseDisableSMAdsForUsers] BIT NOT NULL CONSTRAINT [DF_Organization_UseDisableSMAdsForUsers] 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 new column name uses UseDisableSMAdsForUsers with all-caps "SM", which is inconsistent with the established codebase pattern using Pascal case. All existing Secrets Manager columns use "Sm" (capital S, lowercase m):
-- From Organization.sql:
[SmSeats]
[SmServiceAccounts]
[MaxAutoscaleSmSeats]
[MaxAutoscaleSmServiceAccounts]Should the new field should be UseDisableSmAdsForUsers instead of UseDisableSMAdsForUsers?


🎟️ Tracking
https://bitwarden.atlassian.net/jira/software/c/projects/SM/boards/74?assignee=625cb516fd06270069beaf5d&selectedIssue=SM-1570
📔 Objective
Adding the new column to the database for adding a new item to the organization table for "disabling SM ads for users", this new item is called UseDisableSMAdsForUsers.
📸 Screenshots
N/A
⏰ 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