Can edit?
FreeLogic@rabbinatix/can-edit by Rabbinatixupdated Oct 4, 2026
True when a user's roles include `admin` or `editor`.
Two Array Contains checks joined with OR. Change the role names on the nodes to fit your app.
Shows: Array Contains, OR.
How to use it
Add it to your logic, then add a Call Function step in any logic and pick Can edit. It belongs to no system, so every system can use it. Or download the TypeScript and call it from your own code.
Inputs
roles: List of texts
Outputs
canEdit: Yes / No
Previewdrag the steps around; scroll to zoom
Function Entry, Input / output. 0 inputs, 2 outputs. step 1 of 5
Can edit
roles
Array Contains, Collection. 2 inputs, 1 output. step 2 of 5
Array Contains
array
item
result
Array Contains, Collection. 2 inputs, 1 output. step 3 of 5
Array Contains
array
item
result
OR, Operators. 2 inputs, 1 output. step 4 of 5
OR
A
B
result
Return, Input / output. 2 inputs, 0 outputs. step 5 of 5
Return
canEdit
Arrow keys: next or previous step in flow order. Alt with arrows: nearest step in that direction. Enter: open. Shift F10: more actions.
Examplesrun live against the logic · 2/2 pass
| Passed | Example | Input | Output |
|---|---|---|---|
| Editor | {"roles":["viewer","editor"]} | {"canEdit":true} | |
| Viewer only | {"roles":["viewer"]} | {"canEdit":false} |
Try it
Versions
In this package
Can edit (entry)
