Re: Defining my own project type

2018-01-24 Thread Jesse Glick
On Wed, Jan 24, 2018 at 8:28 AM, Miguelangel Fernandez wrote: > Doesn't Robert's suggestion address the CLI/REST issue? Probably; try it. -- You received this message because you are subscribed to the Google Groups "Jenkins Developers" group. To unsubscribe from this group and stop receiving e

Re: Defining my own project type

2018-01-24 Thread Miguelangel Fernandez
Doesn't Robert's suggestion address the CLI/REST issue? If I extend it and use it in my own authorization strategy, I can deny create permission for the descriptor types of type freestyle, pipeline, etc. But then again, I I've read that descriptors only define and bind the UI displayed, correct?

Re: Defining my own project type

2018-01-24 Thread Miguelangel Fernandez
Sure thing, Jesse. Thank you for pointing that out. I'll keep that in mind. Do you know of a way to also disable these project types for CLI/REST usages? What should I look into? Any pointer in the general direction would be helpful. On Thursday, 18 January 2018 18:51:24 UTC+1, Jesse Glick wrot

Re: Defining my own project type

2018-01-18 Thread Jesse Glick
On Wed, Jan 17, 2018 at 6:22 PM, Miguelangel Fernandez wrote: > I've extended DescriptorVisibilityFilter the > same way the Hide Maven Plugin does. Remember this just hides the link in the GUI. It has no effect on CLI/REST usages, etc. -- You received this message because you are subscribed to

Re: Defining my own project type

2018-01-17 Thread Miguelangel Fernandez
Great stuff guys. As Daniel and Jesse suggested I've extended DescriptorVisibilityFilter the same way the Hide Maven Plugin does. This is a great first step. Now I want to try Robert's idea to see whether I can make this a bit more granular and disable it only for certain user groups. I had no id

Re: Defining my own project type

2018-01-16 Thread Robert Sandell
A much more involved alternative would be to implement your own AuthorizationStrategy and deny regular users create permission on specific TopLevelItemdescriptor types. http://javadoc.jenkins-ci.org/hudson/security/ACL.html#hasCreatePermission-org.acegisecurity.Authentication-hudson.model.ItemGroup

Re: Defining my own project type

2018-01-15 Thread Jesse Glick
Right, you can use `DescriptorVisibilityFilter` if you are in a collegial environment. -- 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 jenkinsci-dev+unsubs

Re: Defining my own project type

2018-01-15 Thread Daniel Beck
> On 15. Jan 2018, at 16:47, Miguelangel Fernandez > wrote: > > • Disable Freestyle, Folder and Pipeline jobs from the "New Item" view. https://github.com/daniel-beck/hide-maven-plugin/ does something similar and should be adaptable for this. But note that this does not mean such proje

Re: Defining my own project type

2018-01-15 Thread Miguelangel Fernandez
Thank you for the advice, Jesse. The Templates Plugin is a feature of Cloudbees Jenkins, not a free open-source plugin. I don't have the budget for CloudBees Jenkins so I've started trying my hand at developing my own project type -which is the first of the items I've outlined above. Doing well

Re: Defining my own project type

2018-01-12 Thread Jesse Glick
On Thu, Jan 11, 2018 at 6:02 AM, Miguelangel Fernandez wrote: > what's a > good plugin to look at to get an idea? For what it’s worth: the CloudBees Templates plugin, along with the Folders Plus plugin, allows precisely your use case. (Templatized jobs are not a new item type; rather, the templat

Defining my own project type

2018-01-11 Thread Miguelangel Fernandez
Hi everyone, I have a very specific use case. All my Jenkins users must be allowed to create jobs that do a very specific thing. Not generic jobs. But jobs that are all created from the same template. I use the Job DSL plugin to create these jobs, and the jobs created all use the same pipeli