* Removed TaxRate logic when creating or updating a Stripe subscription and replaced it with AutomaticTax enabled flag
* Updated Stripe webhook to update subscription to automatically calculate tax
* Removed TaxRate unit tests since Stripe now handles tax
* Removed test proration logic
* Including taxInfo when updating payment method
* Adding the address to the upgrade free org flow if it doesn't exist
* Fixed failing tests and added a new test to validate that the customer is updated
* Changed Import permissions validation to check if the user CanCreate a Collection
* Corrected authorized to import validation allowing import without collections when the user is admin
* Added validation to check if user can import ciphers into existing collections
* swapped feature flag flexible collections with org property
* Removed unused feature service from ImportCiphersController
* Improved code readability
* added null protection against empty org when checking for FlexibleCollections flag
* Feature flag code reference collection
* Provide project
* Try another key
* Use different workflow
* Touch a feature flag to test detection
* Adjust permissions
* Remove another flag
* Bump workflow
* Add label
* Undo changes to constants
* One more test
* Fix logic
* Identify step
* Try modified
* Adjust a flag
* Remove test
* Try with Boolean
* Changed
* Undo flag change again
* Ignore Renovate
Co-authored-by: MtnBurrit0 <77340197+mimartin12@users.noreply.github.com>
* Line break
---------
Co-authored-by: MtnBurrit0 <77340197+mimartin12@users.noreply.github.com>
* [AC-1682] Data migrations for OrgUsers or Groups with AccessAll enabled
* [AC-1682] Added script to update [dbo].[CollectionUser] with [Manage] = 1 for all users with Manager role or 'EditAssignedCollections' permission
* [AC-1682] Updated sql data migration procedures with performance recommendations
* [AC-1682] Moved data migration scripts to DbScripts_transition folder
* Apply suggestions from code review: Remove Manage permission from Collection assignments
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-1682] Removed unnecessary Collection table join on ManagersEditAssignedCollectionUsers sql script
* [AC-1682] Change JOIN to INNER JOIN in SQL scripts
* [AC-1682] Renamed sql script to recent date and added correct order to file name
* [AC-1682] Add new rows to CollectionUser for Managers and users with EditAssignedCollections permission assigned to groups with collection access
* [AC-1682] Update FC data migration scripts to clear AccessAll flags and set all Managers to Users
* [AC-1682] Updated data migration scripts to bump the account revision date
* [AC-1682] Created Organization_EnableCollectionEnhancements to migrate organization data for flexible collections
* [AC-1682] Added script to migrate all organization data for flexible collections
* [AC-1682] Deleted old data migration scripts
* Revert "[AC-1682] Deleted old data migration scripts"
This reverts commit 54cc6fab8f.
* [AC-1682] Modified AccessAllCollectionUsers script to bump revision date by each OrgUser
* [AC-1682] Update data migration script to only enable collection enhancements for organizations that have not yet migrated
* [AC-1682] Updated AccessAllCollectionGroups migration script to use User_BumpAccountRevisionDateByCollectionId
* [AC-1682] Bumped up the date on data migration scripts
* [AC-1682] Added back batching system to AccessAllCollectionUsers data migration script
* [AC-1682] Added data migration script to set FlexibleCollections = 1 for all orgs
* [AC-1682] Modified data migration script to contain multiple transactions
* [AC-1682] Deleted old data migration scripts
* [AC-1682] Placed temp tables outside transactions
* [AC-1682] Removed batching from AllOrgsEnableCollectionEnhancements script
* [AC-1682] Removed bulk data migration script
* [AC-1682] Refactor stored procedure to enable collection enhancements
* [AC-1682] Added missing where clause
* [AC-1682] Modified data migration script to have just one big transaction
* [AC-1682] Combining all updated OrganizationUserIds to bump all revision dates at the same time
* Update src/Sql/dbo/Stored Procedures/Organization_EnableCollectionEnhancements.sql
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* [AC-1682] Renamed aliases
* [AC-1682] Simplified inner queries
* [AC-1682] Bumping each modified groups RevisionDate
* [AC-1682] Removed updating CollectionUser existing records with [ReadOnly] = 0 and [HidePasswords] = 0
* [AC-1682] Updating OrganizationUser RevisionDate
* [AC-1682] Updated the stored procedure file
* [AC-1682] Selecting distinct values to insert into CollectionUser table
* Revert "[AC-1682] Removed updating CollectionUser existing records with [ReadOnly] = 0 and [HidePasswords] = 0"
This reverts commit 086c88f3c6.
* [AC-1682] Bumped up the date on the migration script
* [AC-1682] Updating OrganizationUser RevisionDate
---------
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Add checksum to Login Uri models
* Revert "Revert "Add checksum to Login Uri models (#3318)" (#3417)"
This reverts commit b44887d125.
* PM-4810 Bumped up minimum version
---------
Co-authored-by: Carlos Gonçalves <cgoncalves@bitwarden.com>
Co-authored-by: bnagawiecki <107435978+bnagawiecki@users.noreply.github.com>
Co-authored-by: Carlos Gonçalves <carlosmaccam@gmail.com>
* [Ac-1890] Return CollectionDetailsResponseModel for collection PUT/POST endpoints when a userId is available in the current context
* [AC-1890] Fix broken tests
* [AC-1890] Update to use Organization FC column
* Add missing hide-passwords permission to api models
* Update src/Api/Auth/Models/Public/AssociationWithPermissionsBaseModel.cs
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Rename ToSelectionReadOnly to ToCollectionAccessSelection
* Remove Required attribute which would break backwards compatability
* Update src/Api/Auth/Models/Public/Request/AssociationWithPermissionsRequestModel.cs
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* feat: add Manage property to collection permissions associations, refs AC-1880
* feat: throw if not allowed to send manage property, refs AC-1880
* fix: format, refs AC-1880
* feat: replace ambiguous call for all organizations in cache with specific orgId, refs AC-1880
* feat: move all property assignements back into CollectionAccessSelection init, refs AC-1880
* feat: align bad request messaging, refs AC-1880
---------
Co-authored-by: Daniel James Smith <djsmith@web.de>
Co-authored-by: Daniel James Smith <2670567+djsmith85@users.noreply.github.com>
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Update optionality to use org.FlexibleCollections
Also break old feature flag key to ensure it's never enabled
* Add logic to set defaults for collection management setting
* Update optionality logic to use org property
* Add comments
* Add helper method for getting individual orgAbility
* Fix validate user update permissions interface
* Fix tests
* dotnet format
* Fix more tests
* Simplify self-hosted update logic
* Fix mapping
* Use new getOrganizationAbility method
* Refactor invite and save orgUser methods
Pass in whole organization object instead of using OrganizationAbility
* fix CipherService tests
* dotnet format
* Remove manager check to simplify this set of changes
* Misc cleanup before review
* Fix undefined variable
* Refactor bulk-access endpoint to avoid early repo call
* Restore manager check
* Add tests for UpdateOrganizationLicenseCommand
* Add nullable regions
* Delete unused dependency
* dotnet format
* Fix test
* Tweak EF settings for grant auto-increment
* Go back to zero generated default as that doesn't matter
* Explicit value generation callout
* Go with custom SQL for direct automatic increment
* Proper column creation
* Lint
* Added null check on policy query.
* PM-5659 - OrganizationServiceTests.cs - Add test for scenario in which an org has never turned on the RequireSSO policy and it will be null
* dotnet format
---------
Co-authored-by: Jared Snider <116684653+JaredSnider-Bitwarden@users.noreply.github.com>
Co-authored-by: Thomas Rittson <trittson@bitwarden.com>
* Remove TDE feature flag.
* Removed references to feature service from decryption options builder.
* Removed redundant references.
* Removed test that is no longer valid, as it was testing the feature flag.
* Removed remainder of TDE feature check.
* table storage grants
* simple shard on storage accounts
* use is not
* cosmos grant repo
* remove single storage connection string
* some fixes to dapper grant repo
* pattern matching
* add fallback to base PersistedGrantStore
* service collection extension cleanup
* cleanup
* remove unused Id
* empty string rowkey
* fix sharding method logic
* ttl for cosmos
* make ttl an int
* fixes to cosmos implementation
* fix partition key values
* catch notfound exceptions
* indenting
* update grantitem with custom serialization
* use new transform helpers
* grantloader perf test tool
* ref
* remove grant loader project
* remove table storage implementation
* remove table storage stuff
* all redis fallback to build to null
* revert sln file change
* EOF new line
* remove trailing comma
* lint fixes
* add grant to names
* move cosmos serilaizer to utils
* add some .net 8 keyed service comments
* EnableContentResponseOnWrite
* Fix type in EF grant repository
* Add missing hide-passwords permission to api models
* Update src/Api/Auth/Models/Public/AssociationWithPermissionsBaseModel.cs
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
* Rename ToSelectionReadOnly to ToCollectionAccessSelection
* Remove Required attribute which would break backwards compatability
* Update src/Api/Auth/Models/Public/Request/AssociationWithPermissionsRequestModel.cs
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
---------
Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>