[Tickets #1928] NEW: when using hooks as Group backend doesn't work correctly
bugs@bugs.horde.org
bugs at bugs.horde.org
Sat May 7 11:50:35 PDT 2005
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=1928
-----------------------------------------------------------------------
Ticket | 1928
Created By | m.zdila at episoftware.com
Summary | when using hooks as Group backend doesn't work correctly
Queue | Horde Framework Packages
State | Unconfirmed
Priority | 3. High
Type | Bug
Owners |
-----------------------------------------------------------------------
m.zdila at episoftware.com (2005-05-07 11:50) wrote:
There are different default values in Group.php and Group/hooks.php methods
causing invalid method retun values (for groups and premission methods). For
example, when using hooks and group B is subgroup of A and user U is in the
group B, then userIsInGroup("U", "A", true) returns false. Please apply
following patch (++ modify method comments ;-) ):
diff -u ../horde-portal/lib/Horde/Group/hooks.php lib/Horde/Group/hooks.php
--- ../horde-portal/lib/Horde/Group/hooks.php Fri Jan 7 01:23:57 2005
+++ lib/Horde/Group/hooks.php Sat May 7 20:36:25 2005
@@ -33,9 +33,9 @@
*
* @return array An array of all groups the user is in.
*/
- function getGroupMemberships($user)
+ function getGroupMemberships($user, $parentGroups = false)
{
- $memberships = parent::getGroupMemberships($user);
+ $memberships = parent::getGroupMemberships($user, $parentGroups);
$funcs = get_defined_functions();
foreach ($funcs['user'] as $funcName) {
if (strpos($funcName, '_group_hook_') === 0) {
@@ -62,7 +62,7 @@
* @access public
* @return boolean
*/
- function userIsInGroup($user, $group, $subgroups = false)
+ function userIsInGroup($user, $group, $subgroups = true)
{
if ($this->hasHook($group)) {
if (call_user_func($this->_getGroupHookName($group), $user))
{
More information about the bugs
mailing list