From a98dfe2c992899596f10a6f3ef6dd3c87a8dd44b Mon Sep 17 00:00:00 2001 From: Guillaume Heurtier <guillaume.heurtier@maarch.org> Date: Fri, 27 Nov 2020 13:13:42 +0100 Subject: [PATCH] FEAT #11915 TIME 0:15 fix history privilege in summary sheet --- src/app/resource/controllers/SummarySheetController.php | 3 ++- src/frontend/app/list/summarySheet/summary-sheet.component.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/resource/controllers/SummarySheetController.php b/src/app/resource/controllers/SummarySheetController.php index 2898fed31d0..524dcc29fc3 100755 --- a/src/app/resource/controllers/SummarySheetController.php +++ b/src/app/resource/controllers/SummarySheetController.php @@ -858,7 +858,8 @@ class SummarySheetController } } } elseif ($unit['unit'] == 'workflowHistory') { - if (!PrivilegeController::hasPrivilege(['privilegeId' => 'view_doc_history', 'userId' => $GLOBALS['id']])) { + if (!PrivilegeController::hasPrivilege(['privilegeId' => 'view_doc_history', 'userId' => $GLOBALS['id']]) + && !PrivilegeController::hasPrivilege(['privilegeId' => 'view_full_history', 'userId' => $GLOBALS['id']])) { continue; } diff --git a/src/frontend/app/list/summarySheet/summary-sheet.component.ts b/src/frontend/app/list/summarySheet/summary-sheet.component.ts index 67d7300eb3a..8f20e56201c 100644 --- a/src/frontend/app/list/summarySheet/summary-sheet.component.ts +++ b/src/frontend/app/list/summarySheet/summary-sheet.component.ts @@ -175,7 +175,7 @@ export class SummarySheetComponent implements OnInit { }) ).subscribe(); - if (!this.privilegeService.hasCurrentUserPrivilege('view_doc_history')) { + if (!this.privilegeService.hasCurrentUserPrivilege('view_doc_history') && !this.privilegeService.hasCurrentUserPrivilege('view_full_history')) { this.dataAvailable = this.dataAvailable.filter((item: any) => item.id !== 'workflowHistory'); } } -- GitLab