In the *jelly you could use something like this:
<j:when test="${h.hasPermission(it,app.ADMINISTER)}">
        <a href=“…”>Admin Link</a>
</j:when>
If you have an action which should only be visible in the menu for admins, then 
you can just hide the icon with a permission check in the Action
e.g.: 
https://github.com/jenkinsci/m2release-plugin/blob/master/src/main/java/org/jvnet/hudson/plugins/m2release/M2ReleaseAction.java#L104-L110

/Domi

On 03.01.2014, at 14:52, Bharathi Ramalingam <[email protected]> 
wrote:

> Hi All,
>   I'm developing a plugin which should be only visible to Administrator. I 
> have added a link in the side bar to invoke the plugin page.
> I want to restrict the view only to Administrator. I searched the java docs 
> and found  PermissionGroup  and Permission classes which might do what I'm 
> looking for.
> But I'm wondering where should I actually call them and make the plugin  
> exclusive for Administrator?
> 
> 
> Thanks!
> 
> -- 
> 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].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to