On 12/27/2011 02:11 AM, mohit gupta wrote:
Hi Sergiu,
Then you should take care of how you grant view rights to the group page. I
guess it should be enough to make only one change: on the group page, grant
view right (and you should also grant edit right) to the group itself,
without specifying any other grant/deny rights.
With above configuration also user is able to search and view user details
who belongs to other group :(
Ah, right, this is the only change required *on the group document
itself*. There's another change required at the space level, deny view
rights to anybody; be careful, this might have other side effects, and
you'll have to explicitly grant view rights on some other documents in
the XWiki space... I guess this is something that should be fixed by
default in the official XAR.
On Tue, Dec 27, 2011 at 12:37 PM, Sergiu Dumitriu<[email protected]> wrote:
On 12/26/2011 02:27 AM, mohit gupta wrote:
Hi Sergiu,
Just to give more clarification about my original post I want to
configure it in a way user should be able to search *and view* the
other
users who belongs to same group otherwise it should not be able to search
*and
view* other group user details
Then you should take care of how you grant view rights to the group page.
I guess it should be enough to make only one change: on the group page,
grant view right (and you should also grant edit right) to the group
itself, without specifying any other grant/deny rights.
On Mon, Dec 26, 2011 at 12:20 PM, mohit gupta<[email protected]> wrote:
Thanks Sergiu.As you told * Another option is to post-filter the results
returned by Lucene so that you remove all the user profiles that
shouldn't
be returned. * I am also looking this kind of option but not getting in
which java class i need to make change for this.If you can throw some
light
on this, it would be a great help.
On Mon, Dec 26, 2011 at 11:49 AM, Sergiu Dumitriu<[email protected]>**
wrote:
On 12/26/2011 12:40 AM, mohit gupta wrote:
I have configured to use Lucene search in my xwiki application. Right
now
in xwiki , any user is able to search any other user details by
entering his deatils in serach text box.I want to configure it in a way
user should be able to search the other users who belongs to same
group
otherwise it should not other group user details. Is it configurable in
xwiki or i need to make some changes in code for the same.Thanks.
Search results should only display what is normally visible by the
current user. So, even though you might succeed in making Lucene not
return
these users in a query, the user profiles are still visible to the user.
Another point, all users should normally be in at least one common
group,
XWiki.XWikiAllGroup, unless you explicitly disable this feature.
Still, to answer your question, it should be possible to configure the
search results so that it displays only users having a group in common,
but
it's not very easy. One problem is that groups are defined in a group
document, while Lucene only considers one document at a time, so
whenever
it's considering whether or not to include a user document in the
results,
it doesn't have access to the group definition, so you'll have to
somehow
use this information some other way. One option is to change the
indexing
process so that each Lucene document corresponding to a user should also
list all the groups that user belongs to. Another option is to
post-filter
the results returned by Lucene so that you remove all the user profiles
that shouldn't be returned.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users