mirror of
https://github.com/bitwarden/server
synced 2025-12-20 10:13:39 +00:00
Initial commit of SingleOrg downstream policy checks (#1038)
This commit is contained in:
@@ -135,7 +135,20 @@ namespace Bit.Portal.Controllers
|
||||
case PolicyType.MasterPassword:
|
||||
case PolicyType.PasswordGenerator:
|
||||
case PolicyType.TwoFactorAuthentication:
|
||||
break;
|
||||
|
||||
case PolicyType.SingleOrg:
|
||||
if (enabled)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
var requireSso =
|
||||
await _policyRepository.GetByOrganizationIdTypeAsync(orgId.Value, PolicyType.RequireSso);
|
||||
if (requireSso?.Enabled == true)
|
||||
{
|
||||
ModelState.AddModelError(string.Empty, _i18nService.T("DisableRequireSsoError"));
|
||||
}
|
||||
break;
|
||||
|
||||
case PolicyType.RequireSso:
|
||||
@@ -143,6 +156,7 @@ namespace Bit.Portal.Controllers
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
var singleOrg = await _policyRepository.GetByOrganizationIdTypeAsync(orgId.Value, PolicyType.SingleOrg);
|
||||
if (singleOrg?.Enabled != true)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user