You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Stephen Beaver <sb...@netgate.com> on 2017/02/02 23:01:14 UTC
Adding roles and perms
After much experimenting I have a working Wildly web app secured with Shiro. I authenticate agains an LDAP server, then refer to a local database to get the user's role and permissions.
Is there a way to add those roles to the logged in user so that I can then use Shiro tags (<shiro:hasPermission> et al) in my JSP ? Something like currentUser.putRole("admin"); for example?
Thanks,
Steve
--
Stephen Beaver
Re: Adding roles and perms
Posted by Brian Demers <br...@gmail.com>.
You can also extend the JDBC Realm, use its doGetAuthorization(), and write
a noop for doGetAuthentication()
On Fri, Feb 3, 2017 at 3:22 AM, armandoxxx <ar...@dropchop.com> wrote:
> Yes .. every Realm has doGetAuthorization() method ... just implement it ;)
>
>
>
> Regards
>
> Armando
>
>
>
> --
> View this message in context: http://shiro-user.582556.n2.
> nabble.com/Adding-roles-and-perms-tp7581493p7581494.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>
Re: Adding roles and perms
Posted by armandoxxx <ar...@dropchop.com>.
Yes .. every Realm has doGetAuthorization() method ... just implement it ;)
Regards
Armando
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Adding-roles-and-perms-tp7581493p7581494.html
Sent from the Shiro User mailing list archive at Nabble.com.