Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Can a ScriptRunner validator be run as a privileged user?

Derek Fields Community Leader Sep 20, 2022

I have a validator expression but it requires elevated permissions because I am trying to retrieve the Project Roles of the current assignee to ensure that they are in an appropriate role for assignment. 

The script is pretty simple:

roles = "Role A, Role B, Role C"
.map(r =>
.filter(i => roles.includes(i))
.length > 0

This will check to see if any of the project roles is one of the listed roles. 

The problem is that I get an error message: "You must be the project administrator to access roles of other users"

Is there any way to run this as the add-on user rather than as the current user?

0 answers

Suggest an answer

Log in or Sign up to answer