[commits] [Wiki] changed: HordeGroupAPI
Jan Schneider
jan at horde.org
Tue Mar 1 17:26:24 UTC 2011
jan Tue, 01 Mar 2011 17:26:24 +0000
Modified page: http://wiki.horde.org/HordeGroupAPI
New Revision: 1.18
Change log: Using group objects just acts like an unnecessary proxy.
Simplify API to only work with group IDs.
@@ -25,42 +25,31 @@
* How do we handle backends that can't support nested group
membership? Example: LDAP can store this information but cannot
integrate with other systems like Unix, which has not concept of
nested groups.
----
-++ Horde_Group_Driver
+++ Horde_Group_Base
This is the class that does the work of reading from/saving to the
group storage backend.
-This class should not be used directly, instead Horde_Group objects
are created and used.
+++ create($name)
-Creates a new group and returns a new Horde_Group object.
+Creates a new group and returns a new group ID.
-* Add handlers for $name and $parent parameters from newGroup()
+* Add handlers for $name and $parent parameters from newGroup() (?)
-+++ renameGroup($gid, $newName)
++++ rename($gid, $newName)
Changes the name of a group without affecting its membership list
-+++ removeGroup($gid)
++++ remove($gid)
Removes a group from the groups system permanently.
-
-+++ getByName($name)
-
-Returns a Horde_Group object based on $name
-
-If the name does not match exactly 1 group (too few or too many) it
will raise Horde_Group_Exception with an appropriate error message
-
-+++ getById($gid)
-
-Returns Horde_Group object based on the $gid.
+++ exists($gid)
Boolean: Check if a group exists in the system.
-+++ listGroups()
++++ list()
Returns an array of all groups, in the format gid => name.
+++ listUsers($gid, $recurse = false)
@@ -68,11 +57,11 @@
Get a list of every user that is a part of this group ONLY.
If $recurse is true then also check member groups' user lists.
-+++ getGroupsForUser($user)
++++ listGroups($user)
-Returns an array of Horde_Group objects representing the user's membership
+Returns an array of group IDs representing the user's membership
+++ addUser($gid, $username)
Add a user to a group.
@@ -84,36 +73,7 @@
Remove a user from a group.
* Should be able to handle arrays for both parameters.
++++ search($name)
-++ Horde_Group
-
-This object represents a group
-
-+++ new($name, $create = true)
-Returns an instance of a Horde group. If $create is true and the
group does not exist, it is created. If $create is false and the
group does not exist, or if $create is true and the group already
exists, a Horde_Group_Exception is raised.
-
-+++ id()
-Returns the group's ID
-
-+++ name()
-Returns the group's name
-
-+++ addUser($username)
-Adds $username to the group
-
-+++ removeUser($username)
-Removes $username from the group
-
-+++ listUsers($recurse = true)
-
-+++ hasMember($username)
-Boolean; does this group have $username as a member?
-
-+++ delete()
-Deletes the group from the backend
-
-+++ rename()
-Renames the group
-
-
+Returns a list of group IDs that match the name (substring search?)
More information about the commits
mailing list