mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
PM-5340 - Fix bug where new enterprise orgs without an SSO config couldn't invite new users as I was missing null SSO config handling. (#3593)
This commit is contained in:
@ -1118,7 +1118,7 @@ public class OrganizationService : IOrganizationService
|
||||
|
||||
// Determine if org has SSO enabled and if user is required to login with SSO
|
||||
// Note: we only want to call the DB after checking if the org can use SSO per plan and if they have any policies enabled.
|
||||
var orgSsoEnabled = organization.UseSso && (await _ssoConfigRepository.GetByOrganizationIdAsync(organization.Id)).Enabled;
|
||||
var orgSsoEnabled = organization.UseSso && (await _ssoConfigRepository.GetByOrganizationIdAsync(organization.Id))?.Enabled == true;
|
||||
// Even though the require SSO policy can be turned on regardless of SSO being enabled, for this logic, we only
|
||||
// need to check the policy if the org has SSO enabled.
|
||||
var orgSsoLoginRequiredPolicyEnabled = orgSsoEnabled &&
|
||||
|
Reference in New Issue
Block a user