Add EnableUserEditing, to control whether a regular user can change their own details (default true)

This commit is contained in:
Deluan 2021-05-02 17:10:56 -04:00
commit 7feda4bea4
6 changed files with 22 additions and 0 deletions

View file

@ -17,6 +17,7 @@ const defaultConfig = {
devFastAccessCoverArt: false,
enableStarRating: true,
defaultTheme: 'Dark',
enableUserEditing: true,
}
let config

View file

@ -80,6 +80,9 @@ const CustomUserMenu = ({ onClick, ...rest }) => {
return null
}
if (permissions !== 'admin') {
if (!config.enableUserEditing) {
return null
}
userResource.icon = PersonIcon
} else {
userResource.icon = SupervisorAccountIcon