1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-02 04:11:04 +01:00
bitwarden-server/util/Migrator
Rui Tomé 2b1db97d5c
[PM-18085] Add Manage property to UserCipherDetails (#5390)
* Add Manage permission to UserCipherDetails and CipherDetails_ReadByIdUserId

* Add Manage property to CipherDetails and UserCipherDetailsQuery

* Add integration test for CipherRepository Manage permission rules

* Update CipherDetails_ReadWithoutOrganizationsByUserId to include Manage permission

* Refactor UserCipherDetailsQuery to include detailed permission and organization properties

* Refactor CipherRepositoryTests to improve test organization and readability

- Split large test method into smaller, focused methods
- Added helper methods for creating test data and performing assertions
- Improved test coverage for cipher permissions in different scenarios
- Maintained existing test logic while enhancing code structure

* Refactor CipherRepositoryTests to consolidate cipher permission tests

- Removed redundant helper methods for permission assertions
- Simplified test methods for GetCipherPermissionsForOrganizationAsync, GetManyByUserIdAsync, and GetByIdAsync
- Maintained existing test coverage for cipher manage permissions
- Improved code readability and reduced code duplication

* Add integration test for CipherRepository group collection manage permissions

- Added new test method GetCipherPermissionsForOrganizationAsync_ManageProperty_RespectsCollectionGroupRules
- Implemented helper method CreateCipherInOrganizationCollectionWithGroup to support group-based collection permission testing
- Verified manage permissions are correctly applied based on group collection access settings

* Add @Manage parameter to Cipher stored procedures

- Updated CipherDetails_Create, CipherDetails_CreateWithCollections, and CipherDetails_Update stored procedures
- Added @Manage parameter with comment "-- not used"
- Included new stored procedure implementations in migration script
- Consistent with previous work on adding Manage property to cipher details

* Update UserCipherDetails functions to reorder Manage and ViewPassword columns

* Reorder Manage and ViewPassword properties in cipher details queries

* Bump date in migration script
2025-02-24 11:40:53 +00:00
..
DbScripts [PM-18085] Add Manage property to UserCipherDetails (#5390) 2025-02-24 11:40:53 +00:00
DbScripts_finalization Move DbScripts_finalization to DbScripts (#3675) 2024-02-12 14:00:09 -05:00
DbScripts_transition Add gitkeep files to preserve DbScript folders even if there's no sql scripts in them (#3341) 2023-10-13 15:05:27 +02:00
MySql enh(mysql) Enforce ENGINE=InnoDB (#1470) 2021-07-29 17:12:57 -04:00
DbMigrator.cs Add variable for production migration transaction level (#4702) 2024-10-09 08:48:19 -06:00
DbUpLogger.cs [deps] DbOps: Update dbup-sqlserver to v6 (#4951) 2025-01-09 14:05:26 -07:00
Migrator.csproj [deps] DbOps: Update dbup-sqlserver to v6 (#4951) 2025-01-09 14:05:26 -07:00
MigratorConstants.cs [DEVOPS-1519] Add transition mode to mssql migrator utility (#3259) 2023-09-28 16:29:52 +02:00
SqlServerDbMigrator.cs [PM-6938] Allow certain database operations to be skipped (#3914) 2024-03-27 11:20:54 -04:00