cvs: pear /LiveUser/Perm Medium.php

From: Date: Tue, 21 Feb 2006 19:32:09 +0000
Subject: cvs: pear /LiveUser/Perm Medium.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38465@lists.php.net to get a copy of this message
lsmith Tue Feb 21 19:32:09 2006 UTC Modified files: /pear/LiveUser/Perm Medium.php Log: - add group rights that the user does not have himself http://cvs.php.net/viewcvs.cgi/pear/LiveUser/Perm/Medium.php?r1=1.21&r2=1.22&diff_format=u Index: pear/LiveUser/Perm/Medium.php diff -u pear/LiveUser/Perm/Medium.php:1.21 pear/LiveUser/Perm/Medium.php:1.22 --- pear/LiveUser/Perm/Medium.php:1.21 Tue Feb 21 19:14:17 2006 +++ pear/LiveUser/Perm/Medium.php Tue Feb 21 19:32:09 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.21 2006/02/21 19:14:17 lsmith Exp $ + * @version CVS: $Id: Medium.php,v 1.22 2006/02/21 19:32:09 lsmith Exp $ * @link http://pear.php.net/LiveUser */ @@ -128,11 +128,14 @@ if ($result === false) { return false; } + // 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)) { + unset($tmpRights[$right]); if ($level < 0) { // Revoking rights: A negative value indicates a maximum // possible right level @@ -149,6 +152,7 @@ unset($this->rights[$right]); } } + $this->rights+= $tmpRights; } return $this->rights;

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