Author: jvelociter
Date: 2008-02-01 09:20:59 +0100 (Fri, 01 Feb 2008)
New Revision: 7251

Modified:
   
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java
Log:
Changed visibility from methods isMemberOfGroup and addUserToGroup from private 
to protected so that plugin that extends the 
spacemanager can beneficiate from those.



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
    2008-01-31 22:53:18 UTC (rev 7250)
+++ 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java
    2008-02-01 08:20:59 UTC (rev 7251)
@@ -252,7 +252,6 @@
         return spaceName + ".WebPreferences";
     }
 
-
     /**
      * Get the list of sub spaces to protect
      * @param context
@@ -835,7 +834,7 @@
     /**
      * Gets a list of spaces names in which a specific user has a specific role
      * @param userName The username of the targeted user
-     * @param role The role which the user must have
+     * @param role The role which the user must have (null for just member)
      * @param context The XWiki Context
      * @return list of Strings (space names)
      * @throws SpaceManagerException
@@ -1040,7 +1039,7 @@
     }
 
 
-    private boolean isMemberOfGroup(String username, String groupname, 
XWikiContext context) throws XWikiException {
+    protected boolean isMemberOfGroup(String username, String groupname, 
XWikiContext context) throws XWikiException {
         Collection coll = 
context.getWiki().getGroupService(context).getAllGroupsNamesForMember(username, 
0, 0, context);
         Iterator it = coll.iterator();
         while (it.hasNext()) {
@@ -1057,7 +1056,7 @@
      * @param context
      * @throws XWikiException
      */
-    private void addUserToGroup(String username, String groupName, 
XWikiContext context) throws XWikiException
+    protected void addUserToGroup(String username, String groupName, 
XWikiContext context) throws XWikiException
     {
         // don't add if he is already a member
         if (isMemberOfGroup(username, groupName, context))

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

Reply via email to