Hi Rupinder,
For your case of customizing the group features of XWiki, you should be looking into the following class, com.xpn.xwiki.user.impl.XWikiRightServiceImpl.java. Precisely the following method can be used to control the authorization process, checkAccess(String, XWikiDocument, XWikiContext) To create groups, add users to groups you need to fetch the handle from the context, as context.getWiki(), and you will be GTG. Thanks & Regards, Pradeep Chellur -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, March 11, 2009 7:02 AM To: [email protected] Subject: [xwiki-devs] Customizing XWiki to integrate with a SocialNetworking Site Hi Devs, I have a requirement to customize XWiki to integrate with Communities in a Social Networking Site that I am developing. Members of a Community should be able to view/edit documents created by other members of the same community but they should not be able to view/edit documents created by members of other communities. Essentially, we want to introduce a 'Community Scope' in XWiki. The number of communities and members grows with time, obviously. I think such a feature is not available out of the box. I am planning to do some customization on the Groups feature of XWiki to achieve this requirement. Here is an outline of the approach. 1. When a new community gets created in the social site, create a new Group of corresponding name in XWiki programatically. (need to know what API to call). 2. When a user joins a community, automatically add the user to the XWiki group associated to that community. 3. When a user creates a new document in the community's XWiki, gives rights to the associated community's Group to that document. The Rights module of XWiki will automatically take care of the authorization when that document is requested by any user. The challenge seems to be identifying the right places in code to make changes for 1 and 3. (#2 I can try to achieve by overriding XWikiUser.isUserInGroup() to plugin my custom implementation). Any pointer in this regard will be greatly appreciated. If there is an alternative approach to what I am planning, that would be great too. Thanks, Rupinder Please do not print this email unless it is absolutely necessary. The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately and destroy all copies of this message and any attachments. WARNING: Computer viruses can be transmitted via email. The recipient should check this email and any attachments for the presence of viruses. The company accepts no liability for any damage caused by any virus transmitted by this email. www.wipro.com _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs Generally, this communication is for informational purposes only and it is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. In the event you are receiving the offering materials attached below related to your interest in hedge funds or private equity, this communication may be intended as an offer or solicitation for the purchase or sale of such fund(s). All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates. This transmission may contain information that is privileged, confidential, legally privileged, and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission and any attachments are believed to be free of any virus or other defect that might affect any computer system into which it is received and opened, it is the responsibility of the recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase & Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising in any way from its use. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. Please refer to http://www.jpmorgan.com/pages/disclosures for disclosures relating to UK legal entities. _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

