Fix permission check in pkgreq_close()

Make sure that requests can be auto-accepted if filed by a regular user.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2014-10-03 13:08:32 +02:00
parent 1b22f8046f
commit 76872d8b08

View file

@ -241,7 +241,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) {
$dbh = DB::connect();
$id = intval($id);
if (!has_credential(CRED_PKGREQ_CLOSE)) {
if (!$auto_close && !has_credential(CRED_PKGREQ_CLOSE)) {
return array(false, __("Only TUs and developers can close requests."));
}