mirror of
https://github.com/bitwarden/server.git
synced 2025-04-07 22:18:17 -05:00
Resolve review comments
This commit is contained in:
parent
28fe86ecff
commit
f2348d2264
@ -19,7 +19,7 @@ namespace Bit.Core.Models.Api
|
||||
{
|
||||
Id = new Guid(Id),
|
||||
ReadOnly = ReadOnly,
|
||||
HidePasswords = HidePasswords
|
||||
HidePasswords = HidePasswords,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -3,22 +3,8 @@ RETURNS TABLE
|
||||
AS RETURN
|
||||
SELECT
|
||||
C.*,
|
||||
CASE
|
||||
WHEN
|
||||
OU.[AccessAll] = 1
|
||||
OR G.[AccessAll] = 1
|
||||
OR CU.[ReadOnly] = 0
|
||||
OR CG.[ReadOnly] = 0
|
||||
THEN 0
|
||||
ELSE 1
|
||||
END [ReadOnly],
|
||||
CASE
|
||||
WHEN
|
||||
CU.[HidePasswords] = 0
|
||||
OR CG.[HidePasswords] = 0
|
||||
THEN 0
|
||||
ELSE 1
|
||||
END [HidePasswords]
|
||||
COALESCE(CU.[ReadOnly], CG.[ReadOnly], 0) AS [ReadOnly],
|
||||
COALESCE(CU.[HidePasswords], CG.[HidePasswords], 0) AS [HidePasswords]
|
||||
FROM
|
||||
[dbo].[CollectionView] C
|
||||
INNER JOIN
|
||||
|
@ -2,7 +2,7 @@
|
||||
[CollectionId] UNIQUEIDENTIFIER NOT NULL,
|
||||
[GroupId] UNIQUEIDENTIFIER NOT NULL,
|
||||
[ReadOnly] BIT NOT NULL,
|
||||
[HidePasswords] BIT NOT NULL DEFAULT 0,
|
||||
[HidePasswords] BIT NOT NULL,
|
||||
CONSTRAINT [PK_CollectionGroup] PRIMARY KEY CLUSTERED ([CollectionId] ASC, [GroupId] ASC),
|
||||
CONSTRAINT [FK_CollectionGroup_Collection] FOREIGN KEY ([CollectionId]) REFERENCES [dbo].[Collection] ([Id]),
|
||||
CONSTRAINT [FK_CollectionGroup_Group] FOREIGN KEY ([GroupId]) REFERENCES [dbo].[Group] ([Id]) ON DELETE CASCADE
|
||||
|
@ -2,7 +2,7 @@
|
||||
[CollectionId] UNIQUEIDENTIFIER NOT NULL,
|
||||
[OrganizationUserId] UNIQUEIDENTIFIER NOT NULL,
|
||||
[ReadOnly] BIT NOT NULL,
|
||||
[HidePasswords] BIT NOT NULL DEFAULT 0,
|
||||
[HidePasswords] BIT NOT NULL,
|
||||
CONSTRAINT [PK_CollectionUser] PRIMARY KEY CLUSTERED ([CollectionId] ASC, [OrganizationUserId] ASC),
|
||||
CONSTRAINT [FK_CollectionUser_Collection] FOREIGN KEY ([CollectionId]) REFERENCES [dbo].[Collection] ([Id]) ON DELETE CASCADE,
|
||||
CONSTRAINT [FK_CollectionUser_OrganizationUser] FOREIGN KEY ([OrganizationUserId]) REFERENCES [dbo].[OrganizationUser] ([Id])
|
||||
|
Loading…
x
Reference in New Issue
Block a user