shiro-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan D. Cabrera <>
Subject Re: Unauthorized URL for different entries in filter chain
Date Sun, 26 Jun 2011 18:47:58 GMT

On Jun 26, 2011, at 8:01 AM, Alan D. Cabrera wrote:

> I think I mentioned this a while back and I've run into this again recently.  I would
love to have different unauthorizedUrl entries per chain
>        <property name="filterChainDefinitions">
>            <value>
>                /admin/** = myFilter, roles[admin], /service/notadmin.jsp
>                /work/** = myFilter, roles[verified], /service/notverified.jsp
>                /owners/** = myFilter, roles[owner], /service/notowner.jsp
>                /account/** = myFilter
>            </value>
>        </property>
> I'm going to make a branch to show my proposed changes and if everyone is happy with
them I'll move them into trunk.  The changes will be backward compatible.

Looking at the code I'm wondering if I shouldn't extend the particular filter to do something
like this.

       <property name="filterChainDefinitions">
               /admin/** = myFilter, myRoles[admin|/service/notadmin.jsp] 
               /work/** = myFilter, myRoles[verified|/service/notverified.jsp] 
               /owners/** = myFilter, myRoles[owner|/service/notowner.jsp]
               /account/** = myFilter

No code changes needed then.


View raw message