Right, but the usage pattern is typically from the user/subject, not the realm. The realm(s) indirectly populates the user/subject's roles
On Thu, May 31, 2018 at 2:24 PM, Bart van Leeuwen < bart_van_leeu...@netage.nl> wrote: > Thx for the quick reply! > > This only works from the context of a user, not from the context of a > realm right ? > > Met Vriendelijke Groet / With Kind Regards > Bart van Leeuwen > > > twitter: @semanticfire > tel. +31(0)6-53182997 > Netage B.V. > http://netage.nl > Esdoornstraat 3 > <https://maps.google.com/?q=Esdoornstraat+3&entry=gmail&source=g> > 3461ER Linschoten > The Netherlands > > > > > From: Brian Demers <brian.dem...@gmail.com> > To: user@shiro.apache.org > Date: 31-05-2018 20:22 > Subject: Re: Check for exsitence of roles > ------------------------------ > > > > Take a look at the 'has' methods: > *https://shiro.apache.org/authorization.html#programmatic-authorization* > <https://shiro.apache.org/authorization.html#programmatic-authorization> > Those will return boolean values, as opposed to the `check` methods which > will throw an AuthorizationException > > On Thu, May 31, 2018 at 2:18 PM, Bart van Leeuwen < > *bart_van_leeu...@netage.nl* <bart_van_leeu...@netage.nl>> wrote: > Hi, > > I was wondering if it is possible to check the realm for existence or > roles. > > My use case is that I allow dynamic creating of UI elements which can be > restricted to roles, however if a role does not exist the restriction > should be flagged since it is not possible to satisfy it in the current > realm. > > Met Vriendelijke Groet / With Kind Regards > Bart van Leeuwen > > > twitter: @semanticfire > tel. +31(0)6-53182997 > Netage B.V. > *http://netage.nl* <http://netage.nl/> > *Esdoornstraat 3* > <https://maps.google.com/?q=Esdoornstraat+3&entry=gmail&source=g> > 3461ER Linschoten > The Netherlands > > > >