[aur-dev] [PATCH v3 4/5] git-serve: Drop direct AccountType checking, use AUR_PRIVILEGED

Johannes Löthberg johannes at kyriasis.com
Tue Jun 23 10:26:37 UTC 2015


Signed-off-by: Johannes Löthberg <johannes at kyriasis.com>
---
 git-interface/git-serve.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py
index 9c9bddd..990c86c 100755
--- a/git-interface/git-serve.py
+++ b/git-interface/git-serve.py
@@ -86,8 +86,7 @@ def check_permissions(pkgbase, user):
                                  unix_socket=aur_db_socket, buffered=True)
     cur = db.cursor()
 
-    cur.execute("SELECT AccountTypeID FROM Users WHERE UserName = %s ", [user])
-    if cur.fetchone()[0] > 1:
+    if os.environ.get('AUR_PRIVILEGED', False):
         return True
 
     cur.execute("SELECT COUNT(*) FROM PackageBases " +
-- 
2.4.4


More information about the aur-dev mailing list