1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +01:00
bitwarden-server/util
Rui Tomé bac06763f5
[AC-1682] Flexible collections: data migrations for deprecated permissions (#3437)
* [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>
2024-01-25 14:08:09 +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 [AC-1682] Flexible collections: data migrations for deprecated permissions (#3437) 2024-01-25 14:08:09 +00:00
MsSql [PM-294] Add Database to MSSQL Environment File (#2962) 2023-05-25 16:57:47 -04:00
MsSqlMigratorUtility Stop using lockfiles (#3550) 2023-12-12 09:09:42 -05:00
MySqlMigrations [BEEEP] [SM-1059] Add missing auth table indexes to EF config (#3625) 2024-01-17 10:42:43 -06:00
Nginx nginx preserve upstream header values, fix ip (#2847) 2023-04-13 10:58:03 -04:00
PostgresMigrations [BEEEP] [SM-1059] Add missing auth table indexes to EF config (#3625) 2024-01-17 10:42:43 -06:00
Server Stop using lockfiles (#3550) 2023-12-12 09:09:42 -05:00
Setup Stop using lockfiles (#3550) 2023-12-12 09:09:42 -05:00
SqliteMigrations [BEEEP] [SM-1059] Add missing auth table indexes to EF config (#3625) 2024-01-17 10:42:43 -06:00
SqlServerEFScaffold [deps] SM: Update EntityFrameworkCore to v7.0.15 (#3666) 2024-01-12 16:30:23 -07:00