mirror of
https://github.com/bitwarden/server.git
synced 2025-04-14 09:38:16 -05:00
17 lines
407 B
Transact-SQL
17 lines
407 B
Transact-SQL
CREATE VIEW [dbo].[GroupUserUserDetailsView]
|
|
AS
|
|
SELECT
|
|
OU.[Id] AS [OrganizationUserId],
|
|
OU.[OrganizationId],
|
|
OU.[AccessAll],
|
|
GU.[GroupId],
|
|
U.[Name],
|
|
ISNULL(U.[Email], OU.[Email]) Email,
|
|
OU.[Status],
|
|
OU.[Type]
|
|
FROM
|
|
[dbo].[OrganizationUser] OU
|
|
INNER JOIN
|
|
[dbo].[GroupUser] GU ON GU.[OrganizationUserId] = OU.[Id]
|
|
INNER JOIN
|
|
[dbo].[User] U ON U.[Id] = OU.[UserId] |