Author: ludovic Date: 2007-12-18 21:02:05 +0100 (Tue, 18 Dec 2007) New Revision: 6417
Modified: xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java Log: CURRIKI-1179 added getSpaceNames for user and role Modified: xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java =================================================================== --- xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java 2007-12-18 19:50:04 UTC (rev 6416) +++ xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java 2007-12-18 20:02:05 UTC (rev 6417) @@ -555,11 +555,11 @@ public List getSpaceNames(String userName, String role, XWikiContext context) throws SpaceManagerException { String sql; if (role==null) - sql = "select distinct doc.web from XWikiDocument as doc, BaseObject as obj, StringProperty as memberprop where doc.name='MemberGroup' and doc.fullName=obj.name and obj.className = 'XWiki.XWikiAllGroup'" + sql = "select distinct doc.web from XWikiDocument as doc, BaseObject as obj, StringProperty as memberprop where doc.name='MemberGroup' and doc.fullName=obj.name and obj.className = 'XWiki.XWikiGroups'" + " and obj.id=memberprop.id.id and memberprop.id.name='member' and memberprop.value='" + userName + "'"; else { String roleGroupName = getRoleGroupName("", role).substring(1); - sql = "select distinct doc.web from XWikiDocument as doc, BaseObject as obj, StringProperty as memberprop where doc.name='" + roleGroupName + "' and doc.fullName=obj.name and obj.className = 'XWiki.XWikiAllGroup'" + sql = "select distinct doc.web from XWikiDocument as doc, BaseObject as obj, StringProperty as memberprop where doc.name='" + roleGroupName + "' and doc.fullName=obj.name and obj.className = 'XWiki.XWikiGroups'" + " and obj.id=memberprop.id.id and memberprop.id.name='member' and memberprop.value='" + userName + "'"; } _______________________________________________ notifications mailing list notifications@xwiki.org http://lists.xwiki.org/mailman/listinfo/notifications