From 8ed3c658d468f7f8b9ad7a665820ff243278ab2c Mon Sep 17 00:00:00 2001 From: George Kalampokis Date: Wed, 19 Feb 2020 10:19:48 +0200 Subject: [PATCH] Add get User From DMP on DMP editor --- dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts index d513643c8..aa70c2bce 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts @@ -248,6 +248,13 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC } } + getUserFromDMP(): any { + if (this.dmp) { + const principal: Principal = this.authentication.current(); + return this.dmp.users.find(x => x.id === principal.id); + } + } + registerFormEventsForNewItem() { this.breadCrumbs = observableOf([ {