From 13112b25947598ac3e0f7863b51bbddc8a5bb72b Mon Sep 17 00:00:00 2001 From: Guiheux Steven Date: Mon, 11 Mar 2019 15:41:36 +0100 Subject: [PATCH] fix(api): run from hook uservice (#4016) --- engine/api/workflow_run.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/api/workflow_run.go b/engine/api/workflow_run.go index b0b172e16d..38b934bac8 100644 --- a/engine/api/workflow_run.go +++ b/engine/api/workflow_run.go @@ -836,7 +836,7 @@ func (api *API) postWorkflowRunHandler() service.Handler { } // Check node permission - if !permission.AccessToWorkflowNode(wf, &wf.WorkflowData.Node, u, permission.PermissionReadExecute) { + if getService(ctx) == nil && !permission.AccessToWorkflowNode(wf, &wf.WorkflowData.Node, u, permission.PermissionReadExecute) { return sdk.WrapError(sdk.ErrNoPermExecution, "not enough right on node %s", wf.WorkflowData.Node.Name) }