cvs: pear /LiveUser/Perm Medium.php

From: Date: Wed, 22 Feb 2006 18:38:11 +0000
Subject: cvs: pear /LiveUser/Perm Medium.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38497@lists.php.net to get a copy of this message
lsmith Wed Feb 22 18:38:11 2006 UTC Modified files: /pear/LiveUser/Perm Medium.php Log: - fixed seriously issue with right reading when a user only has group and no direct rights assigned http://cvs.php.net/viewcvs.cgi/pear/LiveUser/Perm/Medium.php?r1=1.22&r2=1.23&diff_format=u Index: pear/LiveUser/Perm/Medium.php diff -u pear/LiveUser/Perm/Medium.php:1.22 pear/LiveUser/Perm/Medium.php:1.23 --- pear/LiveUser/Perm/Medium.php:1.22 Tue Feb 21 19:32:09 2006 +++ pear/LiveUser/Perm/Medium.php Wed Feb 22 18:38:11 2006 @@ -40,7 +40,7 @@ * @author Bjoern Kraus <krausbn@php.net> * @copyright 2002-2005 Markus Wolff * @license http://www.gnu.org/licenses/lgpl.txt - * @version CVS: $Id: Medium.php,v 1.22 2006/02/21 19:32:09 lsmith Exp $ + * @version CVS: $Id: Medium.php,v 1.23 2006/02/22 18:38:11 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -129,9 +129,10 @@ return false; } + $tmpRights = $this->group_rights; + // Check if user has individual rights... if (is_array($this->user_rights)) { - $tmpRights = $this->group_rights; // Overwrite values from temporary array with values from userrights foreach ($this->user_rights as $right => $level) { if (array_key_exists($right, $this->group_rights)) { @@ -152,9 +153,10 @@ unset($this->rights[$right]); } } - $this->rights+= $tmpRights; } + $this->rights+= $tmpRights; + return $this->rights; }

« previous php.pear.cvs (#38497) next »