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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.4 KiB
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],
O.[PlanType],
2020-01-15 15:17:32 -05:00
O.[UsePolicies],
O.[UseSso],
2021-11-17 11:46:35 +01:00
O.[UseKeyConnector],
[EC-261] SCIM (#2105) * scim project stub * some scim models and v2 controllers * implement some v2 scim endpoints * fix spacing * api key auth * EC-261 - SCIM Org API Key and connection type config * EC-261 - Fix lint errors/formatting * updates for okta implementation testing * fix var ref * updates from testing with Okta * implement scim context via provider parsing * support single and list of ids for add/remove groups * log ops not handled * touch up scim context * group list filtering * EC-261 - Additional SCIM provider types * EC-265 - UseScim flag and license update * EC-265 - SCIM provider type of default (0) * EC-265 - Add Scim URL and update connection validation * EC-265 - Model validation and cleanup for SCIM keys * implement scim org connection * EC-265 - Ensure ServiceUrl is not persisted to DB * EC-265 - Exclude provider type from DB if not configured * EC-261 - EF Migrations for SCIM * add docker builds for scim * EC-261 - Fix failing permissions tests * EC-261 - Fix unit tests and pgsql migrations * Formatting fixes from linter * EC-265 - Remove service URL from scim config * EC-265 - Fix unit tests, removed wayward validation * EC-265 - Require self-hosted for billing sync org conn * EC-265 - Fix formatting issues - whitespace * EC-261 - PR feedback and cleanup * scim constants rename * no scim settings right now * update project name * delete package lock * update appsettings configs for scim * use default scim provider for context Co-authored-by: Kyle Spearrin <kyle.spearrin@gmail.com>
2022-07-14 15:58:48 -04:00
O.[UseScim],
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.[UseResetPassword],
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],
OU.[ResetPasswordKey],
O.[PublicKey],
O.[PrivateKey],
2017-03-25 16:34:30 -04:00
OU.[Status],
OU.[Type],
SU.[ExternalId] SsoExternalId,
2021-06-30 09:35:26 +02:00
OU.[Permissions],
PO.[ProviderId],
P.[Name] ProviderName,
SS.[Data] SsoConfig,
OS.[FriendlyName] FamilySponsorshipFriendlyName,
OS.[LastSyncDate] FamilySponsorshipLastSyncDate,
OS.[ToDelete] FamilySponsorshipToDelete,
OS.[ValidUntil] FamilySponsorshipValidUntil
2017-03-06 20:51:13 -05:00
FROM
[dbo].[OrganizationUser] OU
LEFT JOIN
[dbo].[Organization] O ON O.[Id] = OU.[OrganizationId]
LEFT JOIN
[dbo].[SsoUser] SU ON SU.[UserId] = OU.[UserId] AND SU.[OrganizationId] = OU.[OrganizationId]
2021-06-30 09:35:26 +02:00
LEFT JOIN
[dbo].[ProviderOrganization] PO ON PO.[OrganizationId] = O.[Id]
LEFT JOIN
[dbo].[Provider] P ON P.[Id] = PO.[ProviderId]
LEFT JOIN
[dbo].[SsoConfig] SS ON SS.[OrganizationId] = OU.[OrganizationId]
LEFT JOIN
[dbo].[OrganizationSponsorship] OS ON OS.[SponsoringOrganizationUserID] = OU.[Id]