Updating linked records on locked columns by javascript still possible

I am using the self-hosted option in version 3.2.6 and Firefox in the newest version.

If I execute a javascript from a button and the row is manually locked (right click > lock row) the script is still able to update a linked record.

base.addLink(...)

This is the desired behavior.

You can add a link to a locked row in the web interface too.

What is the reason behind this behavior?

The lock is used to prevent users from modify the records from UI.

For example, the admin of the base does not want the users to modify the rows directly, but let the user modify some fields via click a button.

I understand. But the lock is present if I want to update a non-link row by script. For example a normal text column. This is not possible unless I unlock the row, set the value by script and lock it again.

This is only true for JS. The same restriction does not apply for Python scripts.

Now I am completely confused. :thinking:

JS scripts are executed in the browser in the user context. Python scripts are executed on the server. Hence the different behavior.

1 Like

That makes much more sense. Thank for the clarification! :slight_smile:

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.