Author: dward
Date: 2008-01-15 19:52:41 +0100 (Tue, 15 Jan 2008)
New Revision: 6850

Modified:
   
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/Constants.java
   
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/server/CurrikiServiceImpl.java
Log:
- CURRIKI-1413
 - Group and Group Collection spaces are different.

Modified: 
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/Constants.java
===================================================================
--- 
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/Constants.java
        2008-01-15 17:49:39 UTC (rev 6849)
+++ 
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/client/Constants.java
        2008-01-15 18:52:41 UTC (rev 6850)
@@ -141,7 +141,9 @@
     public static final String GROUP_RIGHT_PUBLIC = "open";
     public static final String GROUP_RIGHT_PROTECTED = "protected";
     public static final String GROUP_RIGHT_PRIVATE = "private";
-    public static final String GROUP_COLLECTION_SPACE_PREFIX = "Coll_Group_";
+    public static final String GROUP_SPACE_PREFIX = "Group_";
+    public static final String GROUP_COLLECTION_PREFIX_SPACE_PREFIX = "Coll_";
+    public static final String GROUP_COLLECTION_SPACE_PREFIX = 
GROUP_COLLECTION_PREFIX_SPACE_PREFIX +GROUP_SPACE_PREFIX;
 
     public static final String ASSET_LICENCE_TYPE_DEFAULT = 
"Licences.CurrikiLicense";
     public static final String ASSET_FW_ITEMS_DEFAULT = 
"FW_masterFramework.WebHome";

Modified: 
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/server/CurrikiServiceImpl.java
===================================================================
--- 
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/server/CurrikiServiceImpl.java
       2008-01-15 17:49:39 UTC (rev 6849)
+++ 
xwiki-products/curriki/trunk/gwt/src/main/java/org/curriki/gwt/server/CurrikiServiceImpl.java
       2008-01-15 18:52:41 UTC (rev 6850)
@@ -200,10 +200,11 @@
 
         // Fix for CURRIKI-1413 - Collections for groups need to inherit 
rights from the group
         if (space.startsWith(Constants.GROUP_COLLECTION_SPACE_PREFIX)){
+            String groupSpace = 
space.replaceFirst(Constants.GROUP_COLLECTION_PREFIX_SPACE_PREFIX, "");
             String rights = Constants.RIGHT_PUBLIC;
 
             // TODO: This should probably be using the SpaceManager extension
-            XWikiDocument spaceDoc = 
context.getWiki().getDocument(space+"."+Constants.GROUP_RIGHTS_PAGE, context);
+            XWikiDocument spaceDoc = 
context.getWiki().getDocument(groupSpace+"."+Constants.GROUP_RIGHTS_PAGE, 
context);
             if (spaceDoc != null){
                 // Note that the values for the group access defaults
                 //  DO NOT MATCH the values that need to be applied to the 
collection

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to