Refactor permissions API endpoints, UI group permissions

This commit is contained in:
Michael Shamoon
2022-12-07 21:11:47 -08:00
parent f2d635671d
commit 211fbf0cf6
29 changed files with 353 additions and 139 deletions

View File

@@ -222,9 +222,7 @@ export abstract class ManagementListComponent<T extends ObjectWithId>
}
userCanDelete(object: ObjectWithPermissions): boolean {
return (
!object.owner || this.permissionsService.currentUserIsOwner(object.owner)
)
return this.permissionsService.currentUserOwnsObject(object)
}
userCanEdit(object: ObjectWithPermissions): boolean {