mirror of
https://github.com/bitwarden/server.git
synced 2025-04-05 13:08:17 -05:00

* Refactor OrganizationUser status update procedure to use a GuidIdArray parameter and remove JSON parsing logic * Fix OrganizationUser_SetStatusForUsersById procedure and bump script date * Restore OrganizationUser_SetStatusForUsersById for possible server version rollback. Add new version with the name OrganizationUser_SetStatusForUsersByGuidIdArray * Add migration script to add stored procedure OrganizationUser_SetStatusForUsersByGuidIdArray to update user status by GUID array
15 lines
417 B
Transact-SQL
15 lines
417 B
Transact-SQL
CREATE PROCEDURE [dbo].[OrganizationUser_SetStatusForUsersByGuidIdArray]
|
|
@OrganizationUserIds AS [dbo].[GuidIdArray] READONLY,
|
|
@Status SMALLINT
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
|
|
UPDATE OU
|
|
SET OU.[Status] = @Status
|
|
FROM [dbo].[OrganizationUser] OU
|
|
INNER JOIN @OrganizationUserIds OUI ON OUI.[Id] = OU.[Id]
|
|
|
|
EXEC [dbo].[User_BumpAccountRevisionDateByOrganizationUserIds] @OrganizationUserIds
|
|
END
|