Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to restrict user access to custom plugin developed in Project

Sujatha May 2, 2018

Hi All,

In our Jira project we developed few custom plugin. These plugins are visible in user installed add on section and also after successful uploading of jar files they are visible on the menubar as shown in attached pic. But now we have a requirement to hide this custom plugin from a certain set of users. How can we achieve this. Currently this plugin is visible for all users. We want to restrict the accessibility of this plugin from certain users/group. Please pour in your suggestions and solutions. Thanks in advance !

menubar.jpg

1 answer

1 vote
Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2018

You need to change the code of your plugin. You should put conditions of Web sections and Web Items

Sujatha May 3, 2018

Hi Alexey,

Thanks for answering . Any references for the code change ?

Regards,

Sujatha

Alexey Matveev
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 3, 2018

It would be something like this

<web-panel name="IssueViewersWP" i18n-name-key="issue.viewers.wp.name" key="issue-viewers-wp" location="atl.jira.view.issue.right.context" weight="2">
<description key="issue.viewers.wp.description">The IssueViewersWP Plugin</description>
<context-provider class="ru.matveev.alexey.jira.plugin.webpanel.IssueViewersWebPanel"/>
<conditions type="AND">
<condition class="ru.matveev.alexey.jira.plugin.webpanel.IssueViewersDetailedViewCondition"></condition>
</conditions>
<resource name="view" type="velocity" location="templates/issueviewers.vm"/>
<label key="issue.viewers.wp.name"/>
</web-panel>

In the condition class you provide all the logic

Sujatha May 6, 2018

ok thanks Alexey. I will try this and get back to you in case of further assistance. 

Thanks once again !

Sujatha May 15, 2018

Hi Alexey, we tried in a different way where in options are still visible to user but upon clicking those options a new VM is rendered which shows access restricted page.

As shown below. Thanks for your reply !

restricted.jpg

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events