* Add new models
* Update repositories
* Add new authz handler
* Add new query
* Add new command
* Add authz, command, and query to DI
* Add new endpoint to controller
* Add query unit tests
* Add api unit tests
* Add api integration tests
* Add the ability to get multi projects access
* Add access policy helper + tests
* Add new data/request models
* Add access policy operations to repo
* Add authz handler for new operations
* Add new controller endpoints
* add updating service account revision
* Fix issue where ManageUsers custom permission could not
grant access to collections
* Split ModifyAccess operation to ModifyUserAccess and
ModifyGroupAccess to reflect more granular operations
* [deps] Auth: Update Duende.IdentityServer to v7
* Fixes for upgrade incompatibility
* Update configuration file used in a test
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
Co-authored-by: Ike <137194738+ike-kottlowski@users.noreply.github.com>
* update OrganizationUsersController PUT and POST
* enforces new collection access checks when updating members
* refactor BulkCollectionAuthorizationHandler to avoid repeated db calls
* [AC-1682] Added MySql migration and script
(cherry picked from commit d367f6de6b)
* [AC-1682] Added Postgres migration and script
(cherry picked from commit 9bde1604da)
* [AC-1682] Added Sqlite migration and script
(cherry picked from commit 262887f9c3)
* [AC-1682] dotnet format
(cherry picked from commit 00eea0621c)
* [AC-1682] Fixed Sqlite query
(cherry picked from commit 26f5bf8afd)
* [AC-1682] Drop temp tables if they exist when starting the scripts
(cherry picked from commit c20912f95c)
* [AC-1682] Removed MySql transaction from script because EF migration already wraps it under its own transaction
(cherry picked from commit 7b54d78d67)
* [AC-1682] Setting FlexibleCollections = 1 only for Orgs that had data migrated in previous steps
(cherry picked from commit 28bba94d81)
* [AC-1682] Updated queries to check for OrganizationId
(cherry picked from commit a957530d5e)
* [AC-1682] Fixed MySql script
(cherry picked from commit deee483ab7)
* [AC-1682] Fixed Postgres query
(cherry picked from commit c3ca9ec3c8)
* [AC-1682] Fix Sqlite query
(cherry picked from commit fada0a81bf)
* [AC-1682] Reverted scripts back to enabling Flexible Collections to all existing Orgs
(cherry picked from commit bd3b21b969)
* [AC-1682] Removed dropping temporary table from scripts
(cherry picked from commit eb7794d592)
* [AC-1682] Removed other temp table drops
(cherry picked from commit 26768b7bf8)
* [AC-1978] Fix issue that allows the web app to have the user type Manager available
(cherry picked from commit 2890f78870)
* [AC-1682] Bump dates on migration scripts
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-2323] Added script to migrate all sql organizations to use flexible collections
* [AC-2323] Overriding FlexibleCollectionsSignup to true for local usage
* [AC-2323] Fix script comment
* [AC-2323] Fixed typo
* [AC-2323] Bump up date on migration script
* [AC-2323] Bump migration script date
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* fcmv1 update
* try without nested data obj
* type must be a string
* fcmv1 migration flag
* lint fixes
* fix tests
---------
Co-authored-by: Matt Bishop <mbishop@bitwarden.com>
* Refactored the charge succeeded handler a bit
* If refund charge is received, and we don't have a parent transaction stored already, attempt to create one
* Converted else if structure to switch-case
* Moved logic for invoice.upcoming to a private method
* Moved logic for charge.succeeded to a private method
* Moved logic for charge.refunded to a private method
* Moved logic for invoice.payment_succeeded to a private method
* Updated invoice.payment_failed to match the rest
* Updated invoice.created to match the rest with some light refactors
* Added method comment to HandlePaymentMethodAttachedAsync
* Moved logic for customer.updated to a private method
* Updated logger in default case
* Separated customer.subscription.deleted and customer.subscription.updated to be in their own blocks
* Moved logic for customer.subscription.deleted to a private method
* Moved logic for customer.subscription.updated to a private method
* Merged customer sub updated or deleted to switch
* No longer checking if the user has premium before disabling it since the service already checks
* Moved webhook secret parsing logic to private method
* Moved casting of event to specific object down to handler
* Reduced nesting throughout
* When removing secrets manager, now deleting 100% off password manager discount for SM trials
* Added method comment and reduced nesting in RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync
* Updated GetIdsByMetadata to support providerId
* Refactored the charge succeeded handler a bit
* If refund charge is received, and we don't have a parent transaction stored already, attempt to create one
* Converted else if structure to switch-case
* Moved logic for invoice.upcoming to a private method
* Moved logic for charge.succeeded to a private method
* Moved logic for charge.refunded to a private method
* Moved logic for invoice.payment_succeeded to a private method
* Updated invoice.payment_failed to match the rest
* Updated invoice.created to match the rest with some light refactors
* Added method comment to HandlePaymentMethodAttachedAsync
* Moved logic for customer.updated to a private method
* Updated logger in default case
* Separated customer.subscription.deleted and customer.subscription.updated to be in their own blocks
* Moved logic for customer.subscription.deleted to a private method
* Moved logic for customer.subscription.updated to a private method
* Merged customer sub updated or deleted to switch
* No longer checking if the user has premium before disabling it since the service already checks
* Moved webhook secret parsing logic to private method
* Moved casting of event to specific object down to handler
* Reduced nesting throughout
* When removing secrets manager, now deleting 100% off password manager discount for SM trials
* Added method comment and reduced nesting in RemovePasswordManagerCouponIfRemovingSecretsManagerTrialAsync
* [PM-3176] Extract IOrganizationService.SaveUserAsync to a command
* [PM-3176] Enabled nullable on command
* [PM-3176] Removed check that was not working