mirror of
https://github.com/bitwarden/server.git
synced 2024-12-28 17:57:37 +01:00
read subvaults by confirmed admin user
This commit is contained in:
parent
95fdfeb519
commit
ab173cf5cf
@ -179,5 +179,6 @@
|
||||
<Build Include="dbo\Stored Procedures\Cipher_UpdatePartial.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUser_ReadByOrganizationIdEmail.sql" />
|
||||
<Build Include="dbo\Stored Procedures\OrganizationUser_ReadByOrganizationId.sql" />
|
||||
<Build Include="dbo\Stored Procedures\Subvault_ReadByIdAdminUserId.sql" />
|
||||
</ItemGroup>
|
||||
</Project>
|
@ -0,0 +1,19 @@
|
||||
CREATE PROCEDURE [dbo].[Subvault_ReadByIdAdminUserId]
|
||||
@Id UNIQUEIDENTIFIER,
|
||||
@UserId UNIQUEIDENTIFIER
|
||||
AS
|
||||
BEGIN
|
||||
SET NOCOUNT ON
|
||||
|
||||
SELECT
|
||||
S.*
|
||||
FROM
|
||||
[dbo].[SubvaultView] S
|
||||
INNER JOIN
|
||||
[OrganizationUser] OU ON OU.[OrganizationId] = S.[OrganizationId]
|
||||
WHERE
|
||||
S.[Id] = @Id
|
||||
AND OU.[UserId] = @UserId
|
||||
AND OU.[Status] = 2 -- Confirmed
|
||||
AND OU.[Type] <= 1 -- Owner and admin
|
||||
END
|
@ -14,5 +14,6 @@ BEGIN
|
||||
WHERE
|
||||
S.[OrganizationId] = @OrganizationId
|
||||
AND OU.[UserId] = @UserId
|
||||
AND OU.[Status] = 2 -- Confirmed
|
||||
AND OU.[Type] <= 1 -- Owner and admin
|
||||
END
|
Loading…
Reference in New Issue
Block a user