From 4c0bf3ad9c9acfad25e8399ab729ff0376735a46 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 3 Apr 2023 22:55:44 +0100 Subject: Hide password field when OpenID forced --- modern/src/settings/UserPage.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'modern/src/settings/UserPage.js') diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js index 91500eb4..21859ea7 100644 --- a/modern/src/settings/UserPage.js +++ b/modern/src/settings/UserPage.js @@ -55,6 +55,7 @@ const UserPage = () => { const currentUser = useSelector((state) => state.session.user); const registrationEnabled = useSelector((state) => state.session.server.registration); + const openIdForced = useSelector((state) => state.session.server.openIdForce); const mapStyles = useMapStyles(); const commonUserAttributes = useCommonUserAttributes(t); @@ -135,11 +136,13 @@ const UserPage = () => { label={t('userEmail')} disabled={fixedEmail} /> - setItem({ ...item, password: event.target.value })} - label={t('userPassword')} - /> + {!openIdForced && ( + setItem({ ...item, password: event.target.value })} + label={t('userPassword')} + /> + )} -- cgit v1.2.3