Unverified Commit 7b23bdcf authored by Amir Ehsandar's avatar Amir Ehsandar Committed by GitHub

fix: allow admins to uncheck disallow password if applicable (#4532)

- closes #4469
parent 9b957edd
......@@ -128,7 +128,10 @@ const WorkspaceSection = () => {
<div className="w-full flex flex-row justify-between items-center">
<span>{t("setting.workspace-section.disallow-password-auth")}</span>
<Switch
disabled={workspaceStore.state.profile.mode === "demo" || identityProviderList.length === 0}
disabled={
workspaceStore.state.profile.mode === "demo" ||
(identityProviderList.length === 0 && !workspaceGeneralSetting.disallowPasswordAuth)
}
checked={workspaceGeneralSetting.disallowPasswordAuth}
onChange={(event) => updatePartialSetting({ disallowPasswordAuth: event.target.checked })}
/>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment