Alex Ouzounis edited a comment on Bug JENKINS-21390

found the bug and fixed it in my fork. The problem was in the doBuild method of the InheritanceProject where you call the ACL to see if the user has permissions to build. Problem was you were not using the super method checkPermission from the AbstractItem but implementing it your self.

here is my commit: https://github.com/alexouzounis/jenkins-inheritance-plugin/commit/05263af27577387f8c4b014a60a11ec94a0a81ef

As you can see, what was currently happening is:

ACL acl = Jenkins.getInstance().getACL();
acl.checkPermission(BUILD);

whereas the super.checkPermission does:

Jenkins.getInstance().getAuthorizationStrategy().getACL(this).checkPermission(BUILD);

The difference is that before the ROOT ACL was used (i.e. the global config) whereas not it also taken into account permissions available specify to that project.

Feel free to merge back.

Alex

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to