fix(auth): workflow system handler#3193
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Greptile OverviewGreptile SummaryThis PR changes the The handler now branches on Confidence Score: 2/5
Important Files Changed
Sequence DiagramsequenceDiagram
autonumber
participant C as Caller
participant R as GET /api/workflows/[id]
participant A as checkHybridAuth
participant DB as getWorkflowById
participant P as authorizeWorkflowByWorkspacePermission
C->>R: GET /api/workflows/{id}
R->>A: checkHybridAuth(requireWorkflowId=false)
A-->>R: {success, authType, userId?}
R->>DB: getWorkflowById(workflowId)
DB-->>R: workflowData | null
alt internal_jwt && userId missing
R-->>C: 200 {data: workflowData}
else userId present
R->>P: authorizeWorkflowByWorkspacePermission(workflowId, userId, read)
P-->>R: {allowed, workflow}
alt allowed
R-->>C: 200 {data: workflowData}
else denied
R-->>C: 4xx {error}
end
else no userId
R-->>C: 401 Unauthorized
end
|
Summary
Restore internal JWT bypass for GET workflow route to fix workflow-in-workflow executor calls that don't carry a userId.
Type of Change
Testing
Tested manually
Checklist