Hi,
I am using Shiro with Stripes to create a webapp. I have a Stripes
interceptor that performs the Shiro authentication as outlined here:
http://www.ecyrd.com/ButtUgly/wiki/Main_blogentry_100910_1
http://www.ecyrd.com/ButtUgly/wiki/Main_blogentry_100910_1
I have my classes annotated with the Shiro annotations, such as:
@RequiresRoles("administrator")
I am using a configured PropertiesRealm, with the properties file looking
like the following:
user.jamesb=5e884898da280...11ef721d1542d8,administrator,user
# with no further config for the roles
My stripes pages are obeying my Shiro configuration, and everything is
happy. The question I have is that I want to create a menu to link to my
secured Stripes pages based on if the current user has permission to see
that page, so I am using the Shiro tag library:
<shiro:hasPermission name="what-goes-here">
I know the roles are being obeyed by receiving exceptions if I try to access
a page my role doesn't have access to, but I don't know what name= to pass
the tag library to match the permission based on the annotations in my
classes.
I have tried to hack the PropertiesRealm by subclassing it and trying to
list the permissions by calling doGetAuthorizationInfo, as hinted at here:
http://shiro-user.582556.n2.nabble.com/Retrieving-The-List-Of-Permissions-Or-Roles-For-A-User-td6634613.html
http://shiro-user.582556.n2.nabble.com/Retrieving-The-List-Of-Permissions-Or-Roles-For-A-User-td6634613.html
I'm currently trying to step through the process in the debugger, but it's
painful to say the least!...Any help you could offer would be gratefully
received.
Thanks,
-James
--
View this message in context:
http://shiro-user.582556.n2.nabble.com/permission-names-when-specifying-permission-via-class-level-annotations-tp7047211p7047211.html
Sent from the Shiro User mailing list archive at Nabble.com.