Running Scripts referring to inaccessible matrices

Generic selectors
Exact matches only
Search title only
Search in content
Search in all posts
Search in pages
Solved2.05K viewsScripting

I noted in one of the recent version releases that it is now possible to make scripts refer to a matrix that a user is not given access of in permissions. Kindly advise what we need to add in the script for this to work.

Selected answer as best

From our engineering team…

Scripts are now run in the permission profile of the current user. This does not allow the user to modify a matrix they do not have access to. The script author can elevate the privileges of the script being run by using a privileged block. For example

privileged {

If for some reason the user does not have access to Matrix1 or does not have rights to create items on category A, the privileged block temporarily elevates the privilege of the user in order to perform the actions inside the privileged block.

Selected answer as best

Thanks Mike, this is exactly what I was looking for.