mirror of
https://github.com/bitwarden/server
synced 2025-12-24 12:13:17 +00:00
[EC-758] Add environment variable to enforce SSO Policy for all users (#2428)
* [EC-758] Add environment variable GlobalSettings.Sso.EnforceSsoPolicyForAllUsers to enforce SSO Policy for all users * [EC-758] Add integration tests * [EC-758] Add Entities namespace to resolve ambiguous reference * [EC-758] dotnet format * [EC-758] Updated integration tests to check for logins with all user types * [EC-758] Create new TestServer for each test * [EC-758] Combine unit tests and refactor to use BitAutoData
This commit is contained in:
@@ -368,7 +368,7 @@ public abstract class BaseRequestValidator<T> where T : class
|
||||
PolicyType.RequireSso);
|
||||
// Owners and Admins are exempt from this policy
|
||||
if (orgPolicy != null && orgPolicy.Enabled &&
|
||||
userOrg.Type != OrganizationUserType.Owner && userOrg.Type != OrganizationUserType.Admin)
|
||||
(_globalSettings.Sso.EnforceSsoPolicyForAllUsers || (userOrg.Type != OrganizationUserType.Owner && userOrg.Type != OrganizationUserType.Admin)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user