aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2023-04-03 15:00:39 -0700
committerGitHub <noreply@github.com>2023-04-03 15:00:39 -0700
commit009b1ed37fa2eb07a8faa3a0e1110c3d44584f10 (patch)
tree6c1299a4698207cb45d709a01b2a2ab11cce5c58 /modern
parentc0a702580ce08c1c4ce62b16393e2c354870f724 (diff)
parent4c0bf3ad9c9acfad25e8399ab729ff0376735a46 (diff)
downloadtrackermap-web-009b1ed37fa2eb07a8faa3a0e1110c3d44584f10.tar.gz
trackermap-web-009b1ed37fa2eb07a8faa3a0e1110c3d44584f10.tar.bz2
trackermap-web-009b1ed37fa2eb07a8faa3a0e1110c3d44584f10.zip
Merge pull request #1094 from dan-r/master
Hide password field when OpenID forced
Diffstat (limited to 'modern')
-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>