diff options
author | Anton Tananaev <anton@traccar.org> | 2022-07-31 09:53:57 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-07-31 09:53:57 -0700 |
commit | a5f50db64cd1dca530203ef430b81929eff2b744 (patch) | |
tree | ac9746bf556c4d5b05fd829f375fb1b42e3a0711 /modern/src/settings/UserPage.js | |
parent | 24e927d6a51fd2bbbe1c307b169653d0ba041d70 (diff) | |
download | trackermap-web-a5f50db64cd1dca530203ef430b81929eff2b744.tar.gz trackermap-web-a5f50db64cd1dca530203ef430b81929eff2b744.tar.bz2 trackermap-web-a5f50db64cd1dca530203ef430b81929eff2b744.zip |
Check registration enabled
Diffstat (limited to 'modern/src/settings/UserPage.js')
-rw-r--r-- | modern/src/settings/UserPage.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/settings/UserPage.js b/modern/src/settings/UserPage.js index 392339d0..85f4ae34 100644 --- a/modern/src/settings/UserPage.js +++ b/modern/src/settings/UserPage.js @@ -58,6 +58,7 @@ const UserPage = () => { const fixedEmail = useRestriction('fixedEmail'); const currentUser = useSelector((state) => state.session.user); + const registrationEnabled = useSelector((state) => state.session.server.registration); const commonUserAttributes = useCommonUserAttributes(t); const userAttributes = useUserAttributes(t); @@ -351,7 +352,7 @@ const UserPage = () => { definitions={{ ...commonUserAttributes, ...userAttributes }} focusAttribute={attribute} /> - {item.id === currentUser.id && !manager && ( + {registrationEnabled && item.id === currentUser.id && !manager && ( <Accordion> <AccordionSummary expandIcon={<ExpandMoreIcon />}> <Typography variant="subtitle1" color="error"> |