1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 01:52:49 -05:00

[AC-108] Updated PolicyService to use IApplicationCacheService to determine if an organization uses policies

This commit is contained in:
Rui Tome
2023-08-09 12:48:03 +01:00
parent dd82b8a56f
commit b98b107c4b
7 changed files with 40 additions and 3 deletions

View File

@ -0,0 +1,27 @@
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]
FROM
[dbo].[Organization]
END
GO