Files
server/src/Sql/dbo/Views/OrganizationUserOrganizationDetailsView.sql

33 lines
733 B
MySQL
Raw Normal View History

2017-03-06 20:51:13 -05:00
CREATE VIEW [dbo].[OrganizationUserOrganizationDetailsView]
AS
SELECT
OU.[UserId],
OU.[OrganizationId],
O.[Name],
2017-04-11 10:19:19 -04:00
O.[Enabled],
2020-01-15 15:17:32 -05:00
O.[UsePolicies],
O.[UseSso],
2017-05-08 14:22:40 -04:00
O.[UseGroups],
2017-05-20 15:31:16 -04:00
O.[UseDirectory],
2017-12-14 15:48:44 -05:00
O.[UseEvents],
2017-07-07 14:08:30 -04:00
O.[UseTotp],
2018-04-02 17:20:06 -04:00
O.[Use2fa],
2019-03-01 23:44:45 -05:00
O.[UseApi],
O.[SelfHost],
O.[UsersGetPremium],
2017-05-08 14:22:40 -04:00
O.[Seats],
O.[MaxCollections],
2017-07-07 14:08:30 -04:00
O.[MaxStorageGb],
O.[Identifier],
2017-03-06 20:51:13 -05:00
OU.[Key],
2017-03-25 16:34:30 -04:00
OU.[Status],
OU.[Type],
SU.[ExternalId] SsoExternalId,
OU.[Permissions]
2017-03-06 20:51:13 -05:00
FROM
[dbo].[OrganizationUser] OU
INNER JOIN
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId]
LEFT JOIN
[dbo].[SsoUser] SU ON SU.[UserId] = OU.[UserId] AND SU.[OrganizationId] = OU.[OrganizationId]