Skip to content

fix: flowise-318#6335

Open
0xi4o wants to merge 2 commits intomainfrom
fix/flowise-318
Open

fix: flowise-318#6335
0xi4o wants to merge 2 commits intomainfrom
fix/flowise-318

Conversation

@0xi4o
Copy link
Copy Markdown
Contributor

@0xi4o 0xi4o commented May 4, 2026

No description provided.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces permission-based access control for variables within custom node functions. It adds a canViewVariables check in the controller based on user roles and permissions, which is then passed through the service layer to the execution utility. The utility subsequently sets a skipVariables flag, and the getVars utility is updated to return an empty array when this flag is active. I have no feedback to provide as there are no review comments to evaluate.

@0xi4o 0xi4o marked this pull request as ready for review May 5, 2026 08:35
@0xi4o 0xi4o requested review from HenryHengZJ and igor-magun-wd May 5, 2026 09:12
const orgId = req.user?.activeOrganizationId
const workspaceId = req.user?.activeWorkspaceId
const apiResponse = await nodesService.executeCustomFunction(req.body, workspaceId, orgId)
const canViewVariables = !!(req.user?.isOrganizationAdmin || req.user?.permissions?.includes('variables:view'))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the flow contains a custom function node, and being embedded in other website.

can this work? I'd assume we automatically treat the req.user as org admin? need to confirm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants