n8n
n8n copied to clipboard
fix(editor): Disable expression editor modal opening on readonly field
Expression fields appear editable when they should be in read only state
m
We need to look at expression fields across all nodes to make sure they are 'read only' when a credential on them is being used that isn't shared with the user currently editing. There are a few different scenarios to consider. One is where you're an instance owner/admin and more things look editiable than they should be. The other is that it looks like even for standard member users, expression fields/text input fields are editable when they shouldn't be
Expected behaviour
When editing the Google sheets node where the credential has not been shared with you, you should not be able to edit any of the fields on that nodes.
When opening up the expression editor in full screen mode, it should be greyed out and in read only mode
Actual behaviour
Expression/text fields on certain nodes (if not all) are still editable. You can't save them but its confusing because it looks like you can update and save them and you won't see any error messages. Any changes will just disappear once you refresh.
For certain nodes, you're unable to edit in the small expressions input but once you open up in full screen you can then edit things in there
A/C
Expressions on readonly (when credentials have not been shared) nodes should be readonly for instance owner, instance admin and member users
When you open up the expression editor in full screen mode on any node, this should also be in read only state.
We should check all nodes are handling expressions/text inputs like this consistently
Examples of where this is happening
GMAIL Node - you can't edit the message in the initial view but once you open up to full screen editor you then can
Google Sheets node - You can edit the values to send fields when they should be read only like the fields above
Thanks for fixing this! Added a comment about the requirements on Linear.
Thanks @ivov, sorry, I just missed it. Pushed another fix disabling editing the extended expression editor Thinking on a good way to test it (possibly not in an E2E test)
So readonly works fine, but I'm still seeing this white instead of greyed out. Let's sync on this when you get a chance.
1 flaky test on run #3950 ↗︎
Details:
| 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 cstuncsik 🗃️ e2e/* | |||
| Project: n8n | Commit: 1c39f53250 |
||
| Status: Passed | Duration: 03:20 💡 | ||
| Started: Jan 29, 2024 3:29 PM | Ended: Jan 29, 2024 3:32 PM | ||
cypress/e2e/19-execution.cy.ts • 1 flaky test
| Test | Artifacts | |
|---|---|---|
| Execution > should test manual workflow stop |
Test Replay
Screenshots
Video
|
|
Review all test suite changes for PR #8457 ↗︎
:white_check_mark: All Cypress E2E specs passed
Got released with [email protected]