Change: restrict altering and creation of superusers to superusers only (#8837)

This commit is contained in:
shamoon
2025-01-20 11:57:22 -08:00
committed by GitHub
parent 475c231c6f
commit 41bcc12cc2
7 changed files with 194 additions and 1 deletions

View File

@@ -60,6 +60,11 @@ export class UserEditDialogComponent
ngOnInit(): void {
super.ngOnInit()
this.onToggleSuperUser()
if (!this.currentUserIsSuperUser) {
this.objectForm.get('is_superuser').disable()
} else {
this.objectForm.get('is_superuser').enable()
}
}
getCreateTitle() {