Hi, Thanks for the fast reply. This would be on a local Xwiki installation, ver 0.9.840 I get an error when I run that: Error number 4001 in 4: Error while parsing velocity page XWiki.XWikiClasses Wrapped Exception: Invocation of method 'listGroupsForUser' in class com.xpn.xwiki.user.impl.xwiki.XWikiGroupServiceImpl threw exception class java.lang.NullPointerException : null -----Original Message----- From: jeremi joslin [mailto:[email protected]] Sent: 03 April 2006 16:37 To: [email protected] Subject: Re: [xwiki-users] On 4/3/06, Esbach, Brandon <[email protected]> wrote:
Hi Folks
I was wondering if there is a simple way to determine user-group membership? Simpler than spinning through all members of that group and doing a string match with $context.user at the least?
Hi, it's depends if you are in the farm or not. if you are, it's not possible I think. If not, and if you have the programming right you can do : $context.xWiki.groupService.listGroupsForUser($user.user.user, $context.context) You will receive a collection of documents representing groups. Jérémi -- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 Project Manager XWiki: http://www.xwiki.org skype: jeremi23 -- msn et gtalk : [email protected]
Oh, maybe that change in the last version. try : $context.xWiki.groupService.listGroupsForUser($context.user, $context.context) Jérémi On 4/4/06, Esbach, Brandon <[email protected]> wrote:
Hi, Thanks for the fast reply.
This would be on a local Xwiki installation, ver 0.9.840
I get an error when I run that: Error number 4001 in 4: Error while parsing velocity page XWiki.XWikiClasses Wrapped Exception: Invocation of method 'listGroupsForUser' in class com.xpn.xwiki.user.impl.xwiki.XWikiGroupServiceImpl threw exception class java.lang.NullPointerException : null
-----Original Message----- From: jeremi joslin [mailto:[email protected]] Sent: 03 April 2006 16:37 To: [email protected] Subject: Re: [xwiki-users]
On 4/3/06, Esbach, Brandon <[email protected]> wrote:
Hi Folks
I was wondering if there is a simple way to determine user-group membership? Simpler than spinning through all members of that group and doing a string match with $context.user at the least?
Hi, it's depends if you are in the farm or not. if you are, it's not possible I think.
If not, and if you have the programming right you can do : $context.xWiki.groupService.listGroupsForUser($user.user.user, $context.context)
You will receive a collection of documents representing groups.
Jérémi
-- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 Project Manager XWiki: http://www.xwiki.org skype: jeremi23 -- msn et gtalk : [email protected]
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
-- Blog: http://www.jeremi.info LinkedIn: https://www.linkedin.com/profile?viewProfile=&key=1437724 Project Manager XWiki: http://www.xwiki.org skype: jeremi23 -- msn et gtalk : [email protected]
participants (2)
-
Esbach, Brandon -
jeremi joslin