On Feb 1, 2005, at 10:01 AM, Verma Atul (extern) wrote:
Hi,
I'm new to Lucene and want to know, whether Lucene has the capability of
displaying the search results based the Users Rights.
For Example:
There are suppose some resources, like :
Resource 1 Resource 2 Resource 3 Resource 4
And there are say 2 users with
User 1 having access to Resource 1, Resource 2 and Resource 4; and User 2 having access to Resource 1 and Resource 3
So when User 1 searches the database, then he should get results from Resource 1, 2 and 4, but
When User 2 searches the databse, then he should get results from Resource 1 and 3.
Lucene in Action has a SecurityFilterTest example (grab the source code distribution). You can see a glimpse of this here:
http://www.lucenebook.com/search?query=security
So yes, its possible to index a username or roles alongside each document and apply that criteria to any search a user makes such that a user only gets documents allowed. How complex this gets depends on how you need the permissions to work - the LIA example is rudimentary and simply associates an "owner" with each document and users are only allowed to see the documents they own.
Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]