From 726c323fe1c0c78ee3ac2330673ed0b6a2952421 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 18 Oct 2018 12:25:25 -0400 Subject: [PATCH] accessAll is only for collection assignments --- src/app/organizations/manage/entity-users.component.html | 2 +- src/app/organizations/manage/entity-users.component.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/organizations/manage/entity-users.component.html b/src/app/organizations/manage/entity-users.component.html index 4da510a6b5..5bd3ad6805 100644 --- a/src/app/organizations/manage/entity-users.component.html +++ b/src/app/organizations/manage/entity-users.component.html @@ -53,7 +53,7 @@ + [disabled]="entity === 'collection' && u.accessAll" (change)="selectedChanged(u)" appStopProp> 0) { response.forEach((s) => { - const user = users.data.filter((u) => !u.accessAll && u.id === s); + const user = users.data.filter((u) => u.id === s); if (user != null && user.length > 0) { (user[0] as any).checked = true; } @@ -83,7 +83,7 @@ export class EntityUsersComponent implements OnInit { } this.allUsers.forEach((u) => { - if (u.accessAll) { + if (this.entity === 'collection' && u.accessAll) { (u as any).checked = true; } if ((u as any).checked) { @@ -93,7 +93,7 @@ export class EntityUsersComponent implements OnInit { } check(u: OrganizationUserUserDetailsResponse) { - if (u.accessAll) { + if (this.entity === 'collection' && u.accessAll) { return; } (u as any).checked = !(u as any).checked; @@ -118,7 +118,7 @@ export class EntityUsersComponent implements OnInit { async submit() { try { if (this.entity === 'group') { - const selections = this.users.filter((u) => (u as any).checked && !u.accessAll).map((u) => u.id); + const selections = this.users.filter((u) => (u as any).checked).map((u) => u.id); this.formPromise = this.apiService.putGroupUsers(this.organizationId, this.entityId, selections); } else { const selections = this.users.filter((u) => (u as any).checked && !u.accessAll)