You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by reena upadhyay <re...@outlook.com> on 2014/05/22 12:43:52 UTC
Does shiro provide any api by which I can update/add role
permission in datasource?
Hi,
I want to perform authorization using shiro. I have stored the roles and permission info in database. If I want to update or add new role and permission, then every time I have to go to database, and have to manually execute the query. Does shiro provide any api by which I can update/add role permission in database? Also if insetad of database I am using another data source like ldap to store role, permission info, then is there any shiro api for the same use case.
Thanks,
Reena Upadhyay
Re: Does shiro provide any api by which I can update/add role
permission in datasource?
Posted by Brian Demers <br...@gmail.com>.
Shiro does not have an API to update users/roles. Everybody does this
differently, and lots of systems manage users externally, and only have
read access to this info.
One thing you may want to do in your application (if you are changing users
at runtime) is manage Shiro's cache, you may need to flush a users cache
authc/authz if they change username/password/attributes.
On Thu, May 22, 2014 at 9:40 AM, Tomas Lund Petersen <kotogadekiru@gmail.com
> wrote:
> Reena,
> You have to implement a jdbc realm. There you provide the query to get the
> user/roles resultset.
> El may 22, 2014 7:44 AM, "reena upadhyay" <re...@outlook.com>
> escribió:
>
> Hi,
>>
>> I want to perform authorization using shiro. I have stored the roles and
>> permission info in database. If I want to update or add new role and
>> permission, then every time I have to go to database, and have to manually
>> execute the query. Does shiro provide any api by which I can update/add
>> role permission in database? Also if insetad of database I am using another
>> data source like ldap to store role, permission info, then is there any
>> shiro api for the same use case.
>>
>>
>>
>> *Thanks,Reena Upadhyay*
>>
>
Re: Does shiro provide any api by which I can update/add role
permission in datasource?
Posted by Tomas Lund Petersen <ko...@gmail.com>.
Reena,
You have to implement a jdbc realm. There you provide the query to get the
user/roles resultset.
El may 22, 2014 7:44 AM, "reena upadhyay" <re...@outlook.com> escribió:
> Hi,
>
> I want to perform authorization using shiro. I have stored the roles and
> permission info in database. If I want to update or add new role and
> permission, then every time I have to go to database, and have to manually
> execute the query. Does shiro provide any api by which I can update/add
> role permission in database? Also if insetad of database I am using another
> data source like ldap to store role, permission info, then is there any
> shiro api for the same use case.
>
>
>
> *Thanks,Reena Upadhyay*
>