aboutsummaryrefslogtreecommitdiff
path: root/modern/src/settings
diff options
context:
space:
mode:
authorDan <djr2468@gmail.com>2023-04-03 22:55:44 +0100
committerDan <djr2468@gmail.com>2023-04-03 22:55:44 +0100
commit4c0bf3ad9c9acfad25e8399ab729ff0376735a46 (patch)
tree6c1299a4698207cb45d709a01b2a2ab11cce5c58 /modern/src/settings
parentc0a702580ce08c1c4ce62b16393e2c354870f724 (diff)
downloadtrackermap-web-4c0bf3ad9c9acfad25e8399ab729ff0376735a46.tar.gz
trackermap-web-4c0bf3ad9c9acfad25e8399ab729ff0376735a46.tar.bz2
trackermap-web-4c0bf3ad9c9acfad25e8399ab729ff0376735a46.zip
Hide password field when OpenID forced
Diffstat (limited to 'modern/src/settings')
-rw-r--r--modern/src/settings/UserPage.js13
1 files changed, 8 insertions, 5 deletions
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}
/>
- <TextField
- type="password"
- onChange={(event) => setItem({ ...item, password: event.target.value })}
- label={t('userPassword')}
- />
+ {!openIdForced && (
+ <TextField
+ type="password"
+ onChange={(event) => setItem({ ...item, password: event.target.value })}
+ label={t('userPassword')}
+ />
+ )}
</AccordionDetails>
</Accordion>
<Accordion>