mirror of
https://github.com/fallenbagel/jellyseerr.git
synced 2026-01-04 05:38:37 -05:00
feat: show alert/prompt when settings changes require restart (#2401)
* fix: correct 'StatusChecker' typo * feat: add restart required check to StatusChecker * fix(perms): remove MANAGE_SETTINGS permission * fix: allow alert to be dismissed * fix(lang): add missing string in SettingsServices * fix(frontend): fix modal icon border * fix(frontend): un-dismiss alert if setting reverted not require server restart * fix(backend): restart flag only needs to track main settings * fix: rebase issue * refactor: appease Prettier * refactor: swap settings badge order * fix: type import for MainSettings * test: add cypress test for restart prompt
This commit is contained in:
@@ -67,14 +67,9 @@ const PermissionOption: React.FC<PermissionOptionProps> = ({
|
||||
}
|
||||
|
||||
if (
|
||||
// Non-Admin users cannot modify the Admin permission
|
||||
(actingUser &&
|
||||
!hasPermission(Permission.ADMIN, actingUser.permissions) &&
|
||||
option.permission === Permission.ADMIN) ||
|
||||
// Users without the Manage Settings permission cannot modify/grant that permission
|
||||
(actingUser &&
|
||||
!hasPermission(Permission.MANAGE_SETTINGS, actingUser.permissions) &&
|
||||
option.permission === Permission.MANAGE_SETTINGS)
|
||||
// Only the owner can modify the Admin permission
|
||||
actingUser?.id !== 1 &&
|
||||
option.permission === Permission.ADMIN
|
||||
) {
|
||||
disabled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user