Hi,
according to this example
http://jira-plugin-pack.googlecode.com/svn/trunk/jira-plugin-pack/src/atlassian-plugin.xml
i tried to make one of my webwork1-modules only available for admin-users.
<webwork1 key="myAdminWebwork" name="Administer user dashboards" class="java.lang.Object" roles-required="admin"> ... </webwork1>
Unfortunately the additional attribute "roles-required" had absolutly no effect. Also this webwork can be called even without a login. I tried several other approaches by using condition, but nothing works so far. In the Documentation I've only found ways to secure websections, plugins etc. but not how this is done for webworks.
Greetings Sebastian
As you said, conditions can be done only on web-sections, web-items etc thus preventing users from seeing the action. But they will still be able to access it directly.
You need to handle within the action class. Within the methods, check the permissions before doing anything and redirect to a permission error page if the permission is not there.
A typical example:
if (!permissionManager.hasPermission(Permissions.ADMINISTER, getLoggedInUser())) { return "securitybreach"; }
Hi Jobin,
thanks for your answer. I already used a construct like the one you posted, but i thought there must be a way to handle this in the atlassian-plugin.xml. Anyway, i'm fine with this :)
Greetings Sebastian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What Jira version the additional attribute "roles-required" had absolutly no effect?
I'm trying in 5.0.7 and works fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.