You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by kurtt <ku...@gmail.com> on 2012/09/25 23:01:05 UTC
Problem adding accounts with existing roles
Hi,
I have the standard spring web setup, and I'm using a properties realm,
where I already define some roles and their permissions.
Now I need to dynamically add user accounts with their roles. And
those roles are already defined in my realm.
Example of properties realm file:
role.role1=add.user
role.role2=delete.user
No users initially in the realm.
I'm adding user jdoe with role1
I log in with jdoe.
But SecurityUtils.getSubject().isPermitted("add.user") always returns false.
I know this is a rather bizarre setup. Problem is that the users will
authenticate
against another system, and receive their roles from that system. Afterwards
I want to add those users in my realm, so I can make the link between the
roles
and the permissions.
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Problem-adding-accounts-with-existing-roles-tp7577815.html
Sent from the Shiro User mailing list archive at Nabble.com.
Re: Problem adding accounts with existing roles
Posted by kurtt <ku...@gmail.com>.
Already solved it.
Had to implement my own RolePermissionResolver.
Strange that this isn't supported out of the box.
--
View this message in context: http://shiro-user.582556.n2.nabble.com/Problem-adding-accounts-with-existing-roles-tp7577815p7577819.html
Sent from the Shiro User mailing list archive at Nabble.com.