The core infrastructure backend (API, database, Docker, etc).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

44 lines
962 B

CREATE OR ALTER VIEW [dbo].[OrganizationAbilityView]
AS
SELECT
[Id],
[UseEvents],
[Use2fa],
IIF([Use2fa] = 1 AND [TwoFactorProviders] IS NOT NULL AND [TwoFactorProviders] != '{}', 1, 0) AS [Using2fa],
[UsersGetPremium],
[Enabled],
[UseSso],
[UseKeyConnector],
[UseScim],
[UseResetPassword],
[UseCustomPermissions],
[UsePolicies],
[LimitCollectionCreation],
[LimitCollectionDeletion],
[LimitItemDeletion],
[AllowAdminAccessToAllCollectionItems],
[UseRiskInsights],
[UseOrganizationDomains],
[UseAdminSponsoredFamilies],
[UseAutomaticUserConfirmation],
[UseDisableSmAdsForUsers],
[UsePhishingBlocker],
[UseMyItems]
FROM
[dbo].[Organization]
GO
CREATE OR ALTER PROCEDURE [dbo].[Organization_ReadAbilityById]
@Id UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
*
FROM
[dbo].[OrganizationAbilityView]
WHERE
[Id] = @Id
END
GO