From fefe4edda1a173054a628bcc9827af0b6d00f027 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 7 Mar 2019 15:18:05 -0500 Subject: [PATCH] collection externalId --- jslib | 2 +- .../organizations/manage/collection-add-edit.component.html | 5 +++++ .../organizations/manage/collection-add-edit.component.ts | 3 +++ src/app/organizations/manage/group-add-edit.component.html | 2 +- src/locales/en/messages.json | 4 ++-- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/jslib b/jslib index 3b3b71d8..79fea92b 160000 --- a/jslib +++ b/jslib @@ -1 +1 @@ -Subproject commit 3b3b71d84192cc195f4626d6294b34d788641215 +Subproject commit 79fea92b8152c70ed59188d6acd4948dd81ed235 diff --git a/src/app/organizations/manage/collection-add-edit.component.html b/src/app/organizations/manage/collection-add-edit.component.html index 2c0be6eb..00a6dd46 100644 --- a/src/app/organizations/manage/collection-add-edit.component.html +++ b/src/app/organizations/manage/collection-add-edit.component.html @@ -15,6 +15,11 @@ +
+ + + {{'externalIdDesc' | i18n}} +

{{'groupAccess' | i18n}} diff --git a/src/app/organizations/manage/collection-add-edit.component.ts b/src/app/organizations/manage/collection-add-edit.component.ts index eff40e68..2bf8dd1f 100644 --- a/src/app/organizations/manage/collection-add-edit.component.ts +++ b/src/app/organizations/manage/collection-add-edit.component.ts @@ -38,6 +38,7 @@ export class CollectionAddEditComponent implements OnInit { accessGroups: boolean = false; title: string; name: string; + externalId: string; groups: GroupResponse[] = []; formPromise: Promise; deletePromise: Promise; @@ -65,6 +66,7 @@ export class CollectionAddEditComponent implements OnInit { try { const collection = await this.apiService.getCollectionDetails(this.organizationId, this.collectionId); this.name = await this.cryptoService.decryptToUtf8(new CipherString(collection.name), this.orgKey); + this.externalId = collection.externalId; if (collection.groups != null && this.groups.length > 0) { collection.groups.forEach((s) => { const group = this.groups.filter((g) => !g.accessAll && g.id === s.id); @@ -109,6 +111,7 @@ export class CollectionAddEditComponent implements OnInit { const request = new CollectionRequest(); request.name = (await this.cryptoService.encrypt(this.name, this.orgKey)).encryptedString; + request.externalId = this.externalId; request.groups = this.groups.filter((g) => (g as any).checked && !g.accessAll) .map((g) => new SelectionReadOnlyRequest(g.id, !!(g as any).readOnly)); diff --git a/src/app/organizations/manage/group-add-edit.component.html b/src/app/organizations/manage/group-add-edit.component.html index d7537d52..1a59e55e 100644 --- a/src/app/organizations/manage/group-add-edit.component.html +++ b/src/app/organizations/manage/group-add-edit.component.html @@ -18,7 +18,7 @@
- {{'externalIdGroupDesc' | i18n}} + {{'externalIdDesc' | i18n}}

diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index f8c9d877..4843bd91 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -2044,8 +2044,8 @@ "externalId": { "message": "External Id" }, - "externalIdGroupDesc": { - "message": "The external id is used to link this group to an external system such as a user directory." + "externalIdDesc": { + "message": "The external id can be used as a reference or to link this resource to an external system such as a user directory." }, "accessControl": { "message": "Access Control"