1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-02 04:11:04 +01:00
bitwarden-server/util
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
..
Attachments Fix Attachments base image (#3190) 2023-08-15 19:48:25 -04:00
EfShared [PM-2633] Warnings cleanup (#3010) 2023-06-16 10:02:05 -04:00
Migrator [PM-18085] Add Manage property to UserCipherDetails (#5390) 2025-02-24 11:40:53 +00:00
MsSql Update mssql to CU12 to support linux kernel 6.7.x (#3904) 2024-03-15 13:02:31 -06:00
MsSqlMigratorUtility chore: run dotnet format (#5137) 2024-12-10 18:29:54 +01:00
MySqlMigrations PM-10600: Missing Notification Center MaxLength on Body column (#5402) 2025-02-13 14:14:55 +01:00
Nginx nginx preserve upstream header values, fix ip (#2847) 2023-04-13 10:58:03 -04:00
PostgresMigrations PM-10600: Missing Notification Center MaxLength on Body column (#5402) 2025-02-13 14:14:55 +01:00
Server [PM-5052] Upgrade to .NET 8 (#3461) 2024-02-05 13:03:42 -05:00
Setup Update docker reference link (#5096) 2024-12-06 19:34:50 +01:00
SqliteMigrations PM-10600: Missing Notification Center MaxLength on Body column (#5402) 2025-02-13 14:14:55 +01:00
SqlServerEFScaffold [deps] DbOps: Update EntityFrameworkCore to v8.0.8 (#4651) 2024-08-19 14:21:16 -04:00