diff --git a/util/Migrator/DbScripts/2025-10-15_00_AddDisableSMAdsForUsersToOrganization.sql b/util/Migrator/DbScripts/2025-10-15_00_AddDisableSMAdsForUsersToOrganization.sql index f81ee6cd0c..80d10746ac 100644 --- a/util/Migrator/DbScripts/2025-10-15_00_AddDisableSMAdsForUsersToOrganization.sql +++ b/util/Migrator/DbScripts/2025-10-15_00_AddDisableSMAdsForUsersToOrganization.sql @@ -348,3 +348,40 @@ BEGIN [Id] = @Id END GO + +CREATE OR ALTER PROCEDURE [dbo].[Organization_ReadAbilities] +AS +BEGIN + SET NOCOUNT ON + + SELECT + [Id], + [UseEvents], + [Use2fa], + CASE + WHEN [Use2fa] = 1 AND [TwoFactorProviders] IS NOT NULL AND [TwoFactorProviders] != '{}' THEN + 1 + ELSE + 0 + END AS [Using2fa], + [UsersGetPremium], + [UseCustomPermissions], + [UseSso], + [UseKeyConnector], + [UseScim], + [UseResetPassword], + [UsePolicies], + [Enabled], + [LimitCollectionCreation], + [LimitCollectionDeletion], + [AllowAdminAccessToAllCollectionItems], + [UseRiskInsights], + [LimitItemDeletion], + [UseOrganizationDomains], + [UseAdminSponsoredFamilies], + [UseAutomaticUserConfirmation], + [UseDisableSMAdsForUsers] + FROM + [dbo].[Organization] +END +GO