From 7fb5c82bbc7b50416995b18e1881bb762ead82f6 Mon Sep 17 00:00:00 2001 From: jasquat Date: Mon, 24 Apr 2023 15:37:17 -0400 Subject: [PATCH] give users access to error events if they have access to start a process model w/ burnettk --- .../services/authorization_service.py | 1 + .../src/routes/ProcessInstanceLogList.tsx | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py index 871d8170..1969ce49 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/authorization_service.py @@ -541,6 +541,7 @@ class AuthorizationService: f"/process-instances/for-me/{process_related_path_segment}", f"/logs/{process_related_path_segment}", f"/process-data-file-download/{process_related_path_segment}", + f"/event-error-details/{process_related_path_segment}", ]: permissions_to_assign.append(PermissionToAssign(permission="read", target_uri=target_uri)) else: diff --git a/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx b/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx index 3b86785f..64910fd4 100644 --- a/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx +++ b/spiffworkflow-frontend/src/routes/ProcessInstanceLogList.tsx @@ -213,6 +213,13 @@ export default function ProcessInstanceLogList({ variant }: OwnProps) { setEventErrorDetails(errorObject); }, }); + } else { + const notAuthorized: ProcessInstanceEventErrorDetail = { + id: 0, + message: 'You are not authorized to view error details', + stacktrace: [], + }; + setEventErrorDetails(notAuthorized); } };