mirror of
https://github.com/sct/overseerr.git
synced 2025-09-17 17:24:35 +02:00
fix(api): allow server owner to delete other admin accounts
This commit is contained in:
@@ -281,7 +281,7 @@ router.delete<{ id: string }>(
|
||||
});
|
||||
}
|
||||
|
||||
if (user.hasPermission(Permission.ADMIN)) {
|
||||
if (user.hasPermission(Permission.ADMIN) && req.user?.id !== 1) {
|
||||
return next({
|
||||
status: 405,
|
||||
message: 'You cannot delete users with administrative privileges.',
|
||||
|
Reference in New Issue
Block a user