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? Do the CLI and REST endpoints also depend on 
descriptors?

http://javadoc.jenkins-ci.org/hudson/security/ACL.html#hasCreatePermission-org.acegisecurity.Authentication-hudson.model.ItemGroup-hudson.model.TopLevelItemDescriptor-
 
<http://www.google.com/url?q=http%3A%2F%2Fjavadoc.jenkins-ci.org%2Fhudson%2Fsecurity%2FACL.html%23hasCreatePermission-org.acegisecurity.Authentication-hudson.model.ItemGroup-hudson.model.TopLevelItemDescriptor-&sa=D&sntz=1&usg=AFQjCNFkG2g-IcoGlWC0coQExCMHb2LoAg>

public boolean hasCreatePermission(@Nonnull 
<http://docs.oracle.com/javase/8/docs/api/javax/annotation/Nonnull.html?is-external=true>
                                   org.acegisecurity.Authentication a,
                                   @Nonnull 
<http://docs.oracle.com/javase/8/docs/api/javax/annotation/Nonnull.html?is-external=true>
                                   ItemGroup 
<http://javadoc.jenkins-ci.org/hudson/model/ItemGroup.html> c,
                                   @Nonnull 
<http://docs.oracle.com/javase/8/docs/api/javax/annotation/Nonnull.html?is-external=true>
                                   TopLevelItemDescriptor 
<http://javadoc.jenkins-ci.org/hudson/model/TopLevelItemDescriptor.html> d)

Checks if the given principal has the permission to create top level items 
within the specified item group. 



On Thursday, 18 January 2018 18:51:24 UTC+1, Jesse Glick wrote:
>
> On Wed, Jan 17, 2018 at 6:22 PM, Miguelangel Fernandez 
> <[email protected] <javascript:>> 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 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/708e830e-cf76-4097-86a1-3cf59c2d4563%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to