On 27 May 2014 12:40, Erik de Hair <[email protected]> wrote:

> What do you mean with "Is that the Shiro API?"
>
>
Shiro (which Isis integrates with / sits on top of) has its own API; was
wondering if you were using it.

If you do SubjectUtils.getUser() (or it might be SubjectUtil), then you can
get hold of Shiro's representation of the user.




> I tried it the way you described but that only gives me the wicket role
> mentioned before.
>
>
OK, in which case I need to look into that.

Even if Shiro (per above) does provide access to the roles etc, even so
Isis ought to be able to provide that info through its API (ie it shouldn't
be necessary to dig down to Shiro).  Which it patently isn't.  Slightly
confused as to why not.

Will take a look-see this eve.

Dan




>
>
> On 05/27/2014 12:40 PM, Dan Haywood wrote:
>
> Is that the Shiro API?
>
> ~~~
> I think (hope) that you can get the actual roles via Isis' API:
>
> UserMemento user = DomainObjectContainer.getUser();
> List<RoleMemento> roles = user.getRoles()
>
> Perhaps we're missing something here, though..?
>
> Dan
>
>
>
> On 27 May 2014 11:35, Erik de Hair <[email protected]><mailto:[email protected]>
> wrote:
>
>
>
> Hi,
>
> Calling getUser().getRoles() only gives the role
> "org.apache.isis.viewer.wicket.roles.USER". Is it possible to get the roles
> assigned by shiro via JDBC-realm or do I have to query for these roles
> myself?
>
> Thanks,
> Erik
>
>
>
>
>
>
>

Reply via email to