mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2026-08-11 06:10:20 +02:00
fix(core): Do not allow admins to delete the instance owner (#9489)
This commit is contained in:
@@ -168,6 +168,10 @@ export class UsersController {
|
||||
);
|
||||
}
|
||||
|
||||
if (userToDelete.role === 'global:owner') {
|
||||
throw new ForbiddenError('Instance owner cannot be deleted.');
|
||||
}
|
||||
|
||||
const personalProjectToDelete = await this.projectRepository.getPersonalProjectForUserOrFail(
|
||||
userToDelete.id,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user