Approve assuming permission check
A method call for deleting a pipeline is dangerous yet necessary for managing Jenkins, so that the project admins can programmatically delete unused pipelines. What if there were a way to allow deleting only the pipelines that a user has the permissions to delete? That is where the Approve assuming permission check button comes in.
Feel free to skip this section
The button fills an important gap in Jenkins security; however, there are a few challenges in making the button useful. Getting this to work and understanding why it works requires an extensive understanding of the Jenkins security model. Even if you do get it to work, there are so few methods that implement this feature that it's not really useful. Given the steep learning curve and low utility, my practical recommendation is to use the global shared library wrappers from the previous section instead. Go ahead and follow along for fun (oh the things we do for fun...