mirror of
https://github.com/bitwarden/server.git
synced 2026-02-06 09:03:21 +08:00
reimport db after subvault => collection rename
This commit is contained in:
18
src/Sql/dbo/Views/CollectionUserUserDetailsView.sql
Normal file
18
src/Sql/dbo/Views/CollectionUserUserDetailsView.sql
Normal file
@@ -0,0 +1,18 @@
|
||||
CREATE VIEW [dbo].[CollectionUserUserDetailsView]
|
||||
AS
|
||||
SELECT
|
||||
OU.[Id] AS [OrganizationUserId],
|
||||
OU.[AccessAllCollections],
|
||||
SU.[Id],
|
||||
SU.[CollectionId],
|
||||
U.[Name],
|
||||
ISNULL(U.[Email], OU.[Email]) Email,
|
||||
OU.[Status],
|
||||
OU.[Type],
|
||||
CASE WHEN OU.[AccessAllCollections] = 0 AND SU.[ReadOnly] = 1 THEN 1 ELSE 0 END [ReadOnly]
|
||||
FROM
|
||||
[dbo].[OrganizationUser] OU
|
||||
LEFT JOIN
|
||||
[dbo].[CollectionUser] SU ON OU.[AccessAllCollections] = 0 AND SU.[OrganizationUserId] = OU.[Id]
|
||||
LEFT JOIN
|
||||
[dbo].[User] U ON U.[Id] = OU.[UserId]
|
||||
Reference in New Issue
Block a user