[cvs] [Wiki] changed: HordeGroupAPI

Ben Chavet ben at horde.org
Sun Dec 10 01:05:41 PST 2006


ben  Sun, 10 Dec 2006 01:05:41 -0800

Modified page: http://wiki.horde.org/HordeGroupAPI
New Revision:  1.6
Change log:  nuke some more methods, with an explanation

@@ -12,8 +12,10 @@
  
  A group can also have a parent and multiple children.  All references to parents and children are to be made through API calls.  Again, it is of no concern to the application //how// these relationships are maintained, but only that they exist and are free to be used.
  
  For Horde4, we will move away from the object-oriented method of managing groups in favor of a Horde_Groups class which will act as a group manager.  This should alleviate some of the confusion between the different drivers, and eliminate some of the OO overhead.
+
+Also for Horde4, the way we handle saving groups to the backend will change.  Instead of keeping track of the changes and committing them to storage when updateGroup() is called, all changes should be stored on the fly.  There is a bit of a performance hit for this, but it simplifies the API, and group modifications are rare enough and deliberate enough that this should not be an issue.
  
  ----
  
  ++ Standards
@@ -41,13 +43,11 @@
  
  Changes the name of a group without changing its contents or where it                                                 
  is in the groups hierarchy.  
  
-+++ removeGroup(@@--- $group +++ $gid@@, $force = false)
++++ removeGroup(@@--- $group +++ $gid@@ @@---, $force = false@@)
  
  Removes a group from the groups system permanently.
-
-* Is the $force parameter necessary?  Can we automatically update the backend as updates are provided?  Or, is it faster to get all of the updates, and then commit them to the backend all at once?
  
  +++ getGroupName($gid)
  
  Retrieves the name of a group.
@@ -94,24 +94,8 @@
  
  Remove a user from a group.
  
  * Should be able to handle arrays for both parameters.
-
-+++ updateGroup($group)
-
-##yellow|deprecated?## -- should we always update the backend?
-
-+++ getLevel($gid)
-
-##yellow|deprecated## -- is this used?
-
-+++ getAuditLog($gid)
-
-##yellow|new function## -- do we need this?
-
-+++ clearAuditLog($gid)
-
-##yellow|new function## -- do we need this?
  
  
  +++ @@--- newGroup($name, $parent = DATATREE_ROOT) @@
  
@@ -143,8 +127,24 @@
  
  +++ @@--- listAllUsers($gid) @@
  
  deprecated in favor of listUsers()
+
++++ @@--- getLevel($gid) @@
+
+deprecated -- This is only used in the group admin UI for the tree.  Horde_Tree automatically determines node depth now, so this is no longer necessary.
+
++++ @@--- updateGroup($group) @@
+
+deprecated -- All group modifications are saved to the backend on the fly.
+
++++ @@--- getAuditLog($gid) @@
+
+deprecated -- Only used internally to store group to backend.
+
++++ @@--- clearAuditLog($gid) @@
+
+deprecated -- Only used internally to store group to backend.
  
  
  ++ @@--- !DatatreeObject_Group @@
  
@@ -182,9 +182,9 @@
  * exists($gid)
  * getGroupParent($gid, $deep = false)
  * listGroups()
  * listUsers($gid, $subgroups = false)
-* getGroupMembership($username, $parentGroups = false)
+* getGroupMembership($username, $parents = false)
  * userIsInGroup($username, $gid, $subgroups = true)
  * addUser($username, $gid)
  * removeUser($username, $gid)
  


More information about the cvs mailing list