On Tue, Oct 24, 2017 at 12:35 PM, Shaun Thompson <[email protected]> wrote:
> I'm programmatically creating a job when the
> user installs it's corresponding plugin.

This seems like a bad idea.

> How do I allow the job to create the project using the logged in user's
> abilities.

Who exactly is “the” logged-in user? The concept is meaningless unless
you are inside an HTTP request handling thread, or some rarer cases
like CLI commands—in which case `Jenkins.getAuthentication()` is set,
and so you can check `hasPermission(Item.CREATE)` and behave
accordingly.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr1pvCsa%2BvkhyJ9vtFiPx5Mswvsxnc6KHrtD5_H5hkzjtw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to