From e93f198edef454d179e6524d5162de0a014e5649 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Tue, 23 Jun 2015 14:18:14 +0200 Subject: git-serve: Drop direct AccountType checking, use AUR_PRIVILEGED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Johannes Löthberg Signed-off-by: Lukas Fleischer --- git-interface/git-serve.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git-interface') diff --git a/git-interface/git-serve.py b/git-interface/git-serve.py index 9c9bddd..8316cf7 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', '0') == '1': return True cur.execute("SELECT COUNT(*) FROM PackageBases " + -- cgit v1.2.3-70-g09d2