[AC-1873] Only assign user in the front-end if using Flexible Collections (#7051)

* Only assign user in the front-end if using Flexible Collections

* Fix prettier
This commit is contained in:
Thomas Rittson 2023-12-02 01:45:52 +10:00 committed by GitHub
parent 10d1e7de8e
commit 0d035c5a09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -204,14 +204,12 @@ export class CollectionDialogComponent implements OnInit, OnDestroy {
const currentOrgUserId = users.data.find((u) => u.userId === this.organization?.userId)
?.id;
const initialSelection: AccessItemValue[] =
currentOrgUserId !== undefined
currentOrgUserId !== undefined && flexibleCollections
? [
{
id: currentOrgUserId,
type: AccessItemType.Member,
permission: flexibleCollections
? CollectionPermission.Manage
: CollectionPermission.Edit,
permission: CollectionPermission.Manage,
},
]
: [];