-
Notifications
You must be signed in to change notification settings - Fork 3.3k
fix(auth): workflow system handler #3193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 file reviewed, 1 comment
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