1. Remove _organizationService.ValidateOrganizationUserUpdatePermissions since it is not needed for updating group associations.
2. Remove loggedInUserId since it's no longer needed.
3. Update/remove related tests.
* Updated customer metadata to only store one old btCustomerId
* Updated to include case where old key already exists
* Updated SubscriberService to also save btCustomerId_old on the Stripe Customer's metadata
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* [deps] Auth: Update bootstrap to v5 [SECURITY]
* Update bootstrap and import dependencies in site.scss
* Update site.scss to include the theme color 'dark'
* Refactor site.scss to merge the 'primary-accent' theme color into the existing theme colors
* Update bootstrap classes for v5
* Refactor form layout in Index.cshtml and AddExistingOrganization.cshtml
* Revert change to the shield icon in the navbar
* Fix organization form select inputs
* Fixed search input sizes
* Fix elements in Providers and Users search
* More bootstrap migration
* Revert change to tax rate delete button
* Add missing label classes in Users/Edit.cshtml
* More component migrations
* Refactor form classes and labels in CreateMsp.cshtml and CreateReseller.cshtml
* Update package dependencies in Sso
* Revert changes to Providers/Edit.cshtml
* Refactor CreateMultiOrganizationEnterprise.cshtml and Providers/Edit.cshtml for bootstrap 5
* Refactor webpack.config.js to use @popperjs/core instead of popper.js
* Remove popperjs package dependency
* Restore Bootstrap 4 link styling behavior
- Remove default text decoration
- Add underline only on hover
* Update Bootstrap to version 5.3.3
* Update deprecated text color classes from 'text-muted' to 'text-body-secondary' across various views
* Refactor provider edit view for bootstrap 5
* Remove underline in Add/Create organization links in provider page
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Rui Tome <rtome@bitwarden.com>
Co-authored-by: Rui Tomé <108268980+r-tome@users.noreply.github.com>
refactor(TwoFactorAuthentication): Remove references to old Duo SDK version 2 code and replace them with the Duo SDK version 4 supported library DuoUniversal code.
Increased unit test coverage in the Two Factor Authentication code space. We opted to use DI instead of Inheritance for the Duo and OrganizaitonDuo two factor tokens to increase testability, since creating a testing mock of the Duo.Client was non-trivial.
Reviewed-by: @JaredSnider-Bitwarden
* Remove flag from CreateProviderCommand
* Remove flag from OrganizationsController
* Consolidate provider extensions
* Remove flag from ProvidersController
* Remove flag from CreateMsp.cshtml
* Remove flag from Provider Edit.cshtml
Also ensured the editable Gateway fields show for Multi-organization enterprises
* Remove flag from OrganizationsController
* Remove flag from billing-owned provider controllers
* Remove flag from OrganizationService
* Remove flag from RemoveOrganizationFromProviderCommand
* Remove flag from ProviderService
* Remove flag
* Run dotnet format
* Fix failing tests
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
* PM-13236 PasswordHealthReportApplications db
* PM-13236 incorporated pr comments
* PM-13236 fixed error in SQL script
* PM-13236 resolve quality scan errors SQL71006, SQL7101, SQL70001
* PM-13236 fixed warnings on procedures
* PM-13236 added efMigrations
* PM-13236 renamed files to PasswordHealthReportApplication (singular)
* PM-13236 changed file name to more appropriate naming
* PM-13236 changed the file name singular
* PM-13236 PasswordHealthReportApplication Entities and Repos
* PM-13236 moved files under tools from core
* PM-13236 Entity PasswordHealthReportApplication namespace changed to tools/entities
* PM-13236 moved Repos and Interfaces to tools
* PM-13236 migrated model to tools namespace
* PM-13236 minor fixes to the unit tests
* PM-13236 fixed script errors during build
* PM-13236 Script to drop PasswordHealthReportApplications if it exists
* PM-13236 fixes to database snapshot
* PM-13236 updated databasesnapshots
* PM-13236 Update database model changes for Mysql
* PM-13236 update model changes for Sqlite
* PM-13236 updated the models to remove commented code
* PM-13236 added correct db snapshot for MySql
* PM-13236 updated database snapshot for Postgres
* PM-13236 updated database snapshot for Sqlite
* PM-13236 removed unwanted directive to fix linting error
* PM-13236 removed redundant script files
* PM-13237 Add entity command and unit tests
* PM-13237 Get query added with unit tests
* PM-13237 Controller to add/get PasswordHealthReportApplication
* PM-13237 Setup dependencies in the EF Service collection extensions
* PM-13237 Added unit tests for ReportsController
* Initial refactor of members acess
* Refactor of the members access report to include a list of ciphers
* Saving ciphers to parent object
* Missed saving the response model
* bit.core change and updating references. Removing unused refs
* Removing commented code
* Adding Bit to the namespaces
* The mapping to the response model missed setting the UserId
* Adding CanToggleState to PoliciesControllers (api/public) endpoints. Added mappings wrapped in feature flag.
* Updated logic for determining CanToggle. Removed setting of toggle from List endpoint. Added new details model for single policy response. Validator now returns after first error.
* PM-13236 PasswordHealthReportApplications db
* PM-13236 incorporated pr comments
* PM-13236 fixed error in SQL script
* PM-13236 resolve quality scan errors SQL71006, SQL7101, SQL70001
* PM-13236 fixed warnings on procedures
* PM-13236 added efMigrations
* PM-13236 renamed files to PasswordHealthReportApplication (singular)
* PM-13236 changed file name to more appropriate naming
* PM-13236 changed the file name singular
* PM-13236 PasswordHealthReportApplication Entities and Repos
* PM-13236 moved files under tools from core
* PM-13236 Entity PasswordHealthReportApplication namespace changed to tools/entities
* PM-13236 moved Repos and Interfaces to tools
* PM-13236 migrated model to tools namespace
* PM-13236 minor fixes to the unit tests
* PM-13236 fixed script errors during build
* PM-13236 Script to drop PasswordHealthReportApplications if it exists
* PM-13236 fixes to database snapshot
* PM-13236 updated databasesnapshots
* PM-13236 Update database model changes for Mysql
* PM-13236 update model changes for Sqlite
* PM-13236 updated the models to remove commented code
* PM-13236 added correct db snapshot for MySql
* PM-13236 updated database snapshot for Postgres
* PM-13236 updated database snapshot for Sqlite
* PM-13236 removed unwanted directive to fix linting error
* PM-13236 removed redundant script files
* add collectionIds to the response of `{id}/admin`
- They're now needed in the admin console when add/editing a cipher.
- Prior to this there was no way to edit collection when editing a cipher. Assigning collections was a separate workflow
* return cipher from collections endpoint
* Add ssh key item type
* Add fingerprint
* Limit ssh key ciphers to new clients
* Fix enc string length for 4096 bit rsa keys
* Remove keyAlgorithm from ssh cipher
* Add featureflag and exclude mobile from sync
* Add ssh-agent flag
* Add check for managed user before purging account
* Rename IOrganizationRepository.GetByClaimedUserDomainAsync to GetByVerifiedUserEmailDomainAsync and refactor to return a list. Remove ManagedByOrganizationId from ProfileResponseMode. Add ManagesActiveUser to ProfileOrganizationResponseModel
* Rename the property ManagesActiveUser to UserIsManagedByOrganization
* Remove whole class #nullable enable and add it to specific places
* [PM-11405] Account Deprovisioning: Prevent a verified user from changing their email address
* Remove unnecessary .ToList()
* Refactor IUserService methods GetOrganizationsManagingUserAsync and IsManagedByAnyOrganizationAsync to not return nullable objects. Update ProfileOrganizationResponseModel.UserIsManagedByOrganization to not be nullable
* Prevent deletion of accounts managed by an organization when Account Deprovisioning is enabled
* Add CannotDeleteManagedAccountViewModel and email templates
- Added CannotDeleteManagedAccountViewModel class to handle emails related to preventing deletion of accounts managed by an organization.
- Added HTML and text email templates for sending notifications about the inability to delete an account owned by an organization.
- Updated IMailService interface with a new method to send the cannot delete managed account email.
- Implemented the SendCannotDeleteManagedAccountEmailAsync method in HandlebarsMailService.
- Added a check in UserService to send the cannot delete managed account email if the user is managed by any organization.
- Added a no-op implementation for SendCannotDeleteManagedAccountEmailAsync in NoopMailService.
* Update error message when unable to purge vault for managed account
* Update error message when unable to change email for managed account
* Update error message when unable to delete account when managed by organization
* Update error message in test for deleting organization-owned accounts
* changes to include subscription status metadata
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Fix the failing test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
* Resolve the failing test
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>
---------
Signed-off-by: Cy Okeke <cokeke@bitwarden.com>