mirror of
https://github.com/bitwarden/server.git
synced 2025-05-28 23:04:50 -05:00
limit collection users with accessall to orgid
This commit is contained in:
parent
94fdb72d75
commit
5b5bd4e099
@ -6,6 +6,7 @@ namespace Bit.Core.Models.Data
|
|||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
public Guid OrganizationUserId { get; set; }
|
public Guid OrganizationUserId { get; set; }
|
||||||
|
public Guid? OrganizationId { get; set; }
|
||||||
public Guid? CollectionId { get; set; }
|
public Guid? CollectionId { get; set; }
|
||||||
public bool AccessAll { get; set; }
|
public bool AccessAll { get; set; }
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
@ -4,11 +4,17 @@ AS
|
|||||||
BEGIN
|
BEGIN
|
||||||
SET NOCOUNT ON
|
SET NOCOUNT ON
|
||||||
|
|
||||||
|
DECLARE @OrganizationId UNIQUEIDENTIFIER = (SELECT [OrganizationId] FROM [dbo].[Collection] WHERE [Id] = @CollectionId)
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
*
|
*
|
||||||
FROM
|
FROM
|
||||||
[dbo].[CollectionUserUserDetailsView]
|
[dbo].[CollectionUserUserDetailsView]
|
||||||
WHERE
|
WHERE
|
||||||
[AccessAll] = 1
|
[CollectionId] = @CollectionId
|
||||||
OR [CollectionId] = @CollectionId
|
OR
|
||||||
END
|
(
|
||||||
|
[OrganizationId] = @OrganizationId
|
||||||
|
AND [AccessAll] = 1
|
||||||
|
)
|
||||||
|
END
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
AS
|
AS
|
||||||
SELECT
|
SELECT
|
||||||
OU.[Id] AS [OrganizationUserId],
|
OU.[Id] AS [OrganizationUserId],
|
||||||
|
OU.[OrganizationId],
|
||||||
OU.[AccessAll],
|
OU.[AccessAll],
|
||||||
CU.[Id],
|
CU.[Id],
|
||||||
CU.[CollectionId],
|
CU.[CollectionId],
|
||||||
|
Loading…
x
Reference in New Issue
Block a user