mirror of
https://github.com/bitwarden/server.git
synced 2025-07-07 02:52:50 -05:00
[EC-388] Enforce organization policies when restoring user (#2152)
This commit is contained in:
@ -25,11 +25,11 @@ LEFT JOIN
|
||||
WHERE
|
||||
(
|
||||
(
|
||||
OU.[Status] > 0
|
||||
OU.[Status] != 0 -- OrgUsers who have accepted their invite and are linked to a UserId
|
||||
AND OU.[UserId] = @UserId
|
||||
)
|
||||
OR (
|
||||
OU.[Status] = 0 -- 'Invited' OrgUsers are not linked to a UserId yet, so we have to look up their email
|
||||
OU.[Status] = 0 -- 'Invited' OrgUsers are not linked to a UserId yet, so we have to look up their email
|
||||
AND OU.[Email] IN (SELECT U.Email FROM [dbo].[UserView] U WHERE U.Id = @UserId)
|
||||
)
|
||||
)
|
||||
|
@ -1,7 +1,7 @@
|
||||
CREATE PROCEDURE [dbo].[Policy_CountByTypeApplicableToUser]
|
||||
@UserId UNIQUEIDENTIFIER,
|
||||
@PolicyType TINYINT,
|
||||
@MinimumStatus TINYINT
|
||||
@MinimumStatus SMALLINT
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
@ -1,7 +1,7 @@
|
||||
CREATE PROCEDURE [dbo].[Policy_ReadByTypeApplicableToUser]
|
||||
@UserId UNIQUEIDENTIFIER,
|
||||
@PolicyType TINYINT,
|
||||
@MinimumStatus TINYINT
|
||||
@MinimumStatus SMALLINT
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
Reference in New Issue
Block a user