[AC-2115] Update admin view to also collection check manage flag (#7848)

This commit is contained in:
Shane Melton 2024-02-07 14:31:09 -08:00 committed by GitHub
parent 893197de43
commit c26f1fbf0e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -33,13 +33,13 @@ export class CollectionAdminView extends CollectionView {
override canEdit(org: Organization): boolean {
return org?.flexibleCollections
? org?.canEditAnyCollection
? org?.canEditAnyCollection || this.manage
: org?.canEditAnyCollection || (org?.canEditAssignedCollections && this.assigned);
}
override canDelete(org: Organization): boolean {
return org?.flexibleCollections
? org?.canDeleteAnyCollection
? org?.canDeleteAnyCollection || (!org?.limitCollectionCreationDeletion && this.manage)
: org?.canDeleteAnyCollection || (org?.canDeleteAssignedCollections && this.assigned);
}
}