Scripts not permitted to use staticMethod in Extensible Choice System Groovy

129 views
Skip to first unread message

Victoria Kozel

unread,
Apr 20, 2017, 8:02:17 PM4/20/17
to Jenkins Developers
Hello,

I am writing a simple groovy script to display role-based choices in the Extensible Choice. I get 

org.jenkinsci.plugins.scriptsecurity.sandbox.RejectedAccessException: Scripts not permitted to use staticMethod jenkins.model.Jenkins getInstance

when calling 

def authStrategy = Jenkins.instance.getAuthorizationStrategy()

I am not sure I understand the reason for this, but my question is - Is there a workaround for this error?

Thank you!!
Vicki

Victor Martinez

unread,
Apr 21, 2017, 4:50:31 AM4/21/17
to Jenkins Developers
Please use the right mailing list and don't cross post your questions!


In the above url you can find further details about how to ask and where exactly.

Cheers
Reply all
Reply to author
Forward
0 new messages