Hi, AFAIK you cannot build ProjectMatrixAuthorizationStrategy with the map of permissions. You have to use the add method. I did something similar which is working for a GlobalMatrixAuthorizationStrategy :
def authorizationStrategy = new GlobalMatrixAuthorizationStrategy() ALL_PERMISSIONS.each { authorizationStrategy.add(Permission.fromId(it),user) } On Thu, Nov 13, 2014 at 10:22 PM, Sam Xiao <sam.xs.x...@gmail.com> wrote: > Sorry Daniel! I copied the wrong log. I fixed and updated the gist. > > On Thursday, November 13, 2014 12:54:09 PM UTC-8, Daniel Beck wrote: >> >> Did you paste the entire script? The stack trace mentions line 41... >> >> On 13.11.2014, at 20:34, Sam Xiao <sam.x...@gmail.com> wrote: >> >> > Hello all, >> > >> > I was setting authorization strategy using groovy , so I can put it in >> the `init.groovy` as part of the Jenkins master setup. >> > >> > I was having some error on "no such property", so I wasn't sure what >> and how it got into that: >> > >> > groovy.lang.MissingPropertyException: No such property: >> Permission[class hudson.model.Hudson,Administer] for class: >> hudson.security.ProjectMatrixAuthorizationStrategy >> > >> > My code here: >> > gist >> > >> > Thanks in advance for any help provided. >> > >> > Thanks, >> > Sam. >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "Jenkins Users" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to jenkinsci-use...@googlegroups.com. >> > For more options, visit https://groups.google.com/d/optout. >> >> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- ----- Arnaud Héritier http://aheritier.net Mail/GTalk: aheritier AT gmail DOT com Twitter/Skype : aheritier -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.