mirror of
https://github.com/bitwarden/server
synced 2025-12-30 23:23:37 +00:00
[AC-1117] Add manage permission (#3126)
* Update sql files to add Manage permission * Add migration script * Rename collection manage migration file to remove duplicate migration date * Migrations * Add manage to models * Add manage to repository * Add constraint to Manage columns * Migration lint fixes * Add manage to OrganizationUserUserDetails_ReadWithCollectionsById * Add missing manage fields * Add 'Manage' to UserCollectionDetails * Use CREATE OR ALTER where possible
This commit is contained in:
@@ -19,7 +19,8 @@ BEGIN
|
||||
[Target]
|
||||
SET
|
||||
[Target].[ReadOnly] = [Source].[ReadOnly],
|
||||
[Target].[HidePasswords] = [Source].[HidePasswords]
|
||||
[Target].[HidePasswords] = [Source].[HidePasswords],
|
||||
[Target].[Manage] = [Source].[Manage]
|
||||
FROM
|
||||
[dbo].[CollectionUser] [Target]
|
||||
INNER JOIN
|
||||
@@ -29,6 +30,7 @@ BEGIN
|
||||
AND (
|
||||
[Target].[ReadOnly] != [Source].[ReadOnly]
|
||||
OR [Target].[HidePasswords] != [Source].[HidePasswords]
|
||||
OR [Target].[Manage] != [Source].[Manage]
|
||||
)
|
||||
|
||||
-- Insert
|
||||
@@ -38,7 +40,8 @@ BEGIN
|
||||
@CollectionId,
|
||||
[Source].[Id],
|
||||
[Source].[ReadOnly],
|
||||
[Source].[HidePasswords]
|
||||
[Source].[HidePasswords],
|
||||
[Source].[Manage]
|
||||
FROM
|
||||
@Users [Source]
|
||||
INNER JOIN
|
||||
@@ -71,4 +74,4 @@ BEGIN
|
||||
)
|
||||
|
||||
EXEC [dbo].[User_BumpAccountRevisionDateByCollectionId] @CollectionId, @OrgId
|
||||
END
|
||||
END
|
||||
|
||||
Reference in New Issue
Block a user