Skip to content

Commit

Permalink
Do not display password setting when password auth is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tillprochaska committed Apr 16, 2024
1 parent c178136 commit 5a88cea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ui/src/screens/SettingsScreen/SettingsScreen.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useIntl } from 'react-intl';
import { useSelector } from 'react-redux';
import { selectCurrentRole } from 'selectors';
import { selectCurrentRole, selectMetadata } from 'selectors';
import Screen from 'components/Screen/Screen';
import Dashboard from 'components/Dashboard/Dashboard';
import ProfileSettings from 'components/Settings/ProfileSettings';
Expand All @@ -13,6 +13,7 @@ import './SettingsScreen.scss';

export default function SettingsScreen() {
const currentRole = useSelector(selectCurrentRole);
const metadata = useSelector(selectMetadata);

const intl = useIntl();
const title = intl.formatMessage({
Expand All @@ -33,7 +34,7 @@ export default function SettingsScreen() {
<ProfileSettings />
<NotificationSettings />
<LanguageSettings />
<PasswordSettings />
{metadata.auth.password_login_uri && <PasswordSettings />}
<ApiKeySettings />
</>
)}
Expand Down

0 comments on commit 5a88cea

Please sign in to comment.