Hello, On Tue, Feb 8, 2011 at 2:52 PM, Pidoux75 <pidou...@gmail.com> wrote:
> > Hi, > > Yes, I've tried it but doesn't working, result is false. > On a global group (a group on the main wiki), you can only add global users (users from the main wiki). - If the user for which you're testing isUserInGroup(..) is a local user (from the current wiki - virtual in our case), then false is the correct result. - If the user is global (from the main virtual wiki), then this is what is happening: 1) $xwiki.getUser() gets the global user - xwiki:XWiki.GlobalUserName 2) on the main wiki, this user is stored in the global group as being a local (on the main wiki) user - XWiki.GlobalUserName 3) if you try doing $xwiki.getUser('XWiki.GlobalUser') from the virtual wiki, it will search for this user inside the virtual wiki, and most probably there will be no such user - unless you have 2 users with the same username but on different wikis: local and global wiki - and even if there is such a local, the result should be false (I didn't test it) This is why you can't test from a virtual wiki if the current global user is in a global group. You should open a JIRA issue describing this problem (http://jira.xwiki.org) . Raluca. > -- > View this message in context: > http://xwiki.475771.n2.nabble.com/Test-in-a-virtual-wiki-if-an-user-is-in-a-group-from-main-wiki-tp6003586p6003835.html > Sent from the XWiki- Users mailing list archive at Nabble.com. > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users