fix: allow admins to uncheck disallow password if applicable (#4532)
- closes #4469
This commit is contained in:
parent
9b957edd1f
commit
7b23bdcfcf
1 changed files with 4 additions and 1 deletions
|
|
@ -128,7 +128,10 @@ const WorkspaceSection = () => {
|
||||||
<div className="w-full flex flex-row justify-between items-center">
|
<div className="w-full flex flex-row justify-between items-center">
|
||||||
<span>{t("setting.workspace-section.disallow-password-auth")}</span>
|
<span>{t("setting.workspace-section.disallow-password-auth")}</span>
|
||||||
<Switch
|
<Switch
|
||||||
disabled={workspaceStore.state.profile.mode === "demo" || identityProviderList.length === 0}
|
disabled={
|
||||||
|
workspaceStore.state.profile.mode === "demo" ||
|
||||||
|
(identityProviderList.length === 0 && !workspaceGeneralSetting.disallowPasswordAuth)
|
||||||
|
}
|
||||||
checked={workspaceGeneralSetting.disallowPasswordAuth}
|
checked={workspaceGeneralSetting.disallowPasswordAuth}
|
||||||
onChange={(event) => updatePartialSetting({ disallowPasswordAuth: event.target.checked })}
|
onChange={(event) => updatePartialSetting({ disallowPasswordAuth: event.target.checked })}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue