Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

scriptrunner permission and token problem


I made a scripted workflow postfunction to send email to reviewer. inside the email, I used to display workflow buttons for reviewer to approve/reject. it works well if no special permission setup.

then in my workflow, I want to allow approve/reject only for reviewers, but not for submitters, so I add permission control in workflow condition.

the first problem is. the workflow is triggered by submitter. so the function get all the buttons as submitter's permission, but for the reviewer, so the approve/reject button doesn't show.

How can I provide workflow buttons in email that works for reviewers?

when calling can I set any project role to limit the buttons?

the second problem is, the button by default point to an URL with token inside, but when reviewer receives email and click the button, it always show token missing error "XSRF Security Token Missing". How can I get this error resolved? (although retry works, but the user experience is bad.)



1 answer

For the first problem, just change the order of this postfunction

Thanks for the answer. 

May I know to which step/order should my script run?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Apps & Integrations

Partner Webinar Opportunities: January 2022

Hi everyone 👋, I really like the format of the webinar opportunities summary that @Jimmy Seddon posts monthly on the Welcome Centre group. It's a great place to go to check that you didn...

91 views 1 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you