Yes, Manoj is correct - how you model and store the role/permission
entities is entirely up to you.  You would query for them however you
want based on the datastore you're using.

Cheers,

Les

On Fri, Sep 2, 2011 at 9:19 AM, Manoj Khangaonkar <[email protected]> wrote:
> Current Shiro API like Subject.isPermitted(String permission) will let you 
> check
> if the subject has a particular permission.
>
> To get the list of printers to which a user has permission ( to say
> display on a UI) ,
> you would need to implement your own DAO with the appropriate get method.
>
> The storage , retrieval and management of  user , role , permission
> metadata is currently
> done outside of Shiro. Shiro interfaces with this metadata using Realm
> interface.
>
> Hope that helps,
>
> Manoj
>
>
> On Thu, Sep 1, 2011 at 2:55 PM, manitas <[email protected]> wrote:
>> Hello
>>
>> Shiro is based on wildcard permissions.
>>
>> For example I can have the 2 following permissions for user jsmith
>>
>> printer:print:lp7200
>> printer:print:epsoncolor
>>
>> Let's say that there are more than 2 printers available but jsmith only have
>> permission to print on these ones.
>>
>> What would be the best way to retrieve this information to propose only
>> these two printers when jsmith wants to print something ?
>>
>> Do I need to do a basic fulltext search (with "like" function for example :
>> LIKE 'printer:print:%') or is there something in the shiro api that can help
>> me ?
>>
>> Thanks in advance for your help.
>>
>> --
>> View this message in context: 
>> http://shiro-user.582556.n2.nabble.com/Reverse-query-on-permissions-tp6751893p6751893.html
>> Sent from the Shiro User mailing list archive at Nabble.com.
>>
>
>
>
> --
> http://khangaonkar.blogspot.com/

Reply via email to