[aur-dev] [PATCH 1/2] Fix permission check in pkgreq_close()

Lukas Fleischer archlinux at cryptocrack.de
Fri Oct 3 11:12:39 UTC 2014


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

Signed-off-by: Lukas Fleischer <archlinux at cryptocrack.de>
---
 web/lib/pkgreqfuncs.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php
index 9207043..b2a7089 100644
--- a/web/lib/pkgreqfuncs.inc.php
+++ b/web/lib/pkgreqfuncs.inc.php
@@ -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."));
 	}
 
-- 
2.1.2


More information about the aur-dev mailing list