mirror of
https://github.com/bitwarden/server.git
synced 2026-04-12 00:31:55 -05:00
45 lines
962 B
Transact-SQL
45 lines
962 B
Transact-SQL
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
|