8 changed files with 165 additions and 0 deletions
@ -0,0 +1,13 @@
@@ -0,0 +1,13 @@
|
||||
CREATE PROCEDURE [dbo].[Organization_ReadAbilityById] |
||||
@Id UNIQUEIDENTIFIER |
||||
AS |
||||
BEGIN |
||||
SET NOCOUNT ON |
||||
|
||||
SELECT |
||||
* |
||||
FROM |
||||
[dbo].[OrganizationAbilityView] |
||||
WHERE |
||||
[Id] = @Id |
||||
END |
||||
@ -0,0 +1,28 @@
@@ -0,0 +1,28 @@
|
||||
CREATE 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] |
||||
@ -0,0 +1,44 @@
@@ -0,0 +1,44 @@
|
||||
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 |
||||
Loading…
Reference in new issue