You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Dan Haywood <da...@haywood-associates.co.uk> on 2013/09/26 15:08:12 UTC

Custom PermissionResolver with built-in $iniRealm?

We have a custom implementation of PermissionResolver in Apache Isis, which
sets up our own IsisPermission [1,2].  Typical usage as per its tests [3]

I can configure this fine with as the permissionResolver of a custom
ldapRealm we've defined.

But is it possible to configure the built-in $iniRealm to also use this
PermissionResolver?

Thx
Dan





[1]
https://github.com/apache/isis/blob/master/component/security/shiro/src/main/java/org/apache/isis/security/shiro/authorization/IsisPermissionResolver.java
[2]
https://github.com/apache/isis/blob/master/component/security/shiro/src/main/java/org/apache/isis/security/shiro/authorization/IsisPermission.java
[3]
https://github.com/apache/isis/blob/master/component/security/shiro/src/test/java/org/apache/isis/security/shiro/IsisPermissionTest_typicalUsage.java

Re: Custom PermissionResolver with built-in $iniRealm?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Thanks, Les... we'll try that out.

Cheers
Dan


On 28 September 2013 19:59, Les Hazlewood <lh...@apache.org> wrote:

> Hi Dan,
>
> It appears that the reference syntax is incorrect.  It should be:
>
> permissionResolver
> = org.apache.isis.security.shiro.authorization.IsisPermissionResolver
> iniRealm.permissionResolver = $permissionResolver
>
> Best,
>
> --
> Les Hazlewood | @lhazlewood
> CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282
>
>
> On Fri, Sep 27, 2013 at 2:31 AM, Dan Haywood <dan@haywood-associates.co.uk
> > wrote:
>
>> I did, yes... though this is a PermissionResolver, not a
>> RolePermissionResolver.
>>
>> anyway, so I did:
>>
>> permissionResolver
>> = org.apache.isis.security.shiro.authorization.IsisPermissionResolver
>> $iniRealm.permissionResolver = permissionResolver
>>
>> No joy.
>>
>>
>>
>>
>>
>> On 27 September 2013 09:22, versatec <ro...@versatec.de> wrote:
>>
>>> Have you tried
>>> yourRolePermissionResolver = package.name.YourRolePermissionResolver
>>> $iniRealm.rolePermissionResolver = $yourRolePermissionResolver
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://shiro-user.582556.n2.nabble.com/Custom-PermissionResolver-with-built-in-iniRealm-tp7579182p7579193.html
>>> Sent from the Shiro User mailing list archive at Nabble.com.
>>>
>>
>>
>

Re: Custom PermissionResolver with built-in $iniRealm?

Posted by Les Hazlewood <lh...@apache.org>.
Hi Dan,

It appears that the reference syntax is incorrect.  It should be:

permissionResolver
= org.apache.isis.security.shiro.authorization.IsisPermissionResolver
iniRealm.permissionResolver = $permissionResolver

Best,

--
Les Hazlewood | @lhazlewood
CTO, Stormpath | http://stormpath.com | @goStormpath | 888.391.5282


On Fri, Sep 27, 2013 at 2:31 AM, Dan Haywood
<da...@haywood-associates.co.uk>wrote:

> I did, yes... though this is a PermissionResolver, not a
> RolePermissionResolver.
>
> anyway, so I did:
>
> permissionResolver
> = org.apache.isis.security.shiro.authorization.IsisPermissionResolver
> $iniRealm.permissionResolver = permissionResolver
>
> No joy.
>
>
>
>
>
> On 27 September 2013 09:22, versatec <ro...@versatec.de> wrote:
>
>> Have you tried
>> yourRolePermissionResolver = package.name.YourRolePermissionResolver
>> $iniRealm.rolePermissionResolver = $yourRolePermissionResolver
>>
>>
>>
>> --
>> View this message in context:
>> http://shiro-user.582556.n2.nabble.com/Custom-PermissionResolver-with-built-in-iniRealm-tp7579182p7579193.html
>> Sent from the Shiro User mailing list archive at Nabble.com.
>>
>
>

Re: Custom PermissionResolver with built-in $iniRealm?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
I did, yes... though this is a PermissionResolver, not a
RolePermissionResolver.

anyway, so I did:

permissionResolver
= org.apache.isis.security.shiro.authorization.IsisPermissionResolver
$iniRealm.permissionResolver = permissionResolver

No joy.





On 27 September 2013 09:22, versatec <ro...@versatec.de> wrote:

> Have you tried
> yourRolePermissionResolver = package.name.YourRolePermissionResolver
> $iniRealm.rolePermissionResolver = $yourRolePermissionResolver
>
>
>
> --
> View this message in context:
> http://shiro-user.582556.n2.nabble.com/Custom-PermissionResolver-with-built-in-iniRealm-tp7579182p7579193.html
> Sent from the Shiro User mailing list archive at Nabble.com.
>

Re: Custom PermissionResolver with built-in $iniRealm?

Posted by versatec <ro...@versatec.de>.
Have you tried
yourRolePermissionResolver = package.name.YourRolePermissionResolver
$iniRealm.rolePermissionResolver = $yourRolePermissionResolver 



--
View this message in context: http://shiro-user.582556.n2.nabble.com/Custom-PermissionResolver-with-built-in-iniRealm-tp7579182p7579193.html
Sent from the Shiro User mailing list archive at Nabble.com.