I have to deal with an application which is secured by apache shiro.
I'm quite new to this framework. As far as I can see, I can check single rights via subject.isPermitted()
, e.g.
Subject subject = SecurityUtils.getSubject();
[...]
subject.isPermitted("$RightString");
For logging purposes I need the complete list of user rights as a String. And I do not want to iterate over the list of rights and check everytime, whether subject.isPermitted()
is true
Is there any shortcut to this problem?
Edit:
Further Information:
- Application is a Spring 4 Application
realm is defined in in application context as a bean
<bean id="PRODUCTNAMERealm" class="de.PATHFROMPRODUCT_PRODUCTNAMEJdbcRealm"> <property name="dataSource" ref="dataSource"/> <property name="schema" value="${PRODUCTNAME.schema}"/> </bean>
so i could inject it if needed.