Re: [pear-webmaster] Re: [PEAR-CORE] cvs: pearweb /public_html/admin package-maintainers.php

From: Date: Fri, 03 Sep 2004 09:13:43 +0000
Subject: Re: [pear-webmaster] Re: [PEAR-CORE] cvs: pearweb /public_html/admin package-maintainers.php
References: 1 2  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-3054@lists.php.net to get a copy of this message
Martin Jansen wrote:
On Thu Sep 02, 2004 at 01:0043AM -0000, Daniel Convissor wrote:
danielc Wed Sep 1 21:00:43 2004 EDT
 Modified files:                 /pearweb/public_html/admin	package-maintainers.php  Log:
* Let QA edit maintainers. Patch by Klaus. http://cvs.php.net/diff.php/pearweb/public_html/admin/package-maintainers.php?r1=1.8&r2=1.9&ty=u Index: pearweb/public_html/admin/package-maintainers.php diff -u pearweb/public_html/admin/package-maintainers.php:1.8 pearweb/public_html/admin/package-maintainers.php:1.9 +++ pearweb/public_html/admin/package-maintainers.php Wed Sep 1 21:00:43 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+
   | Authors: Martin Jansen <mj@php.net>                                  |
+----------------------------------------------------------------------+ - $Id: package-maintainers.php,v 1.8 2004/05/10 21:44:38 pajoye Exp $ + $Id: package-maintainers.php,v 1.9 2004/09/02 01:00:43 danielc Exp $ */ require_once "HTML/Form.php"; @@ -156,8 +156,9 @@
    auth_require();
    $lead = in_array($_COOKIE['PEAR_USER'], array_keys(maintainer::get($package, true)));
    $admin = user::isAdmin($_COOKIE['PEAR_USER']);
+    $qa    = user::isQA($_COOKIE['PEAR_USER']);
-    return ($lead || $admin);
+    return ($lead || $qa || $admin);
}
So it looks like there are two places where the karma for updating maintainers is checked. I suggest we drop the check in package-maintainers.php and only use the one in pear-database.php. Opinions? The reason this is here is that it prevents the form from being displayed if you don't have the rights. The reason it is important that maintainer::updateAll() needs to have the check is so that people can't bypass the form and submit via the querystring, so the on-submit check in pear-maintainers.php could be dropped. Or so that future edits don't forget to put the karma check in.
I think it's a good idea to at least check before displaying the form, because it lets people know whether they have appropriate permissions before they see anything. Klaus

« previous php.pear.webmaster (#3054) next »