summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2015-01-07 12:16:41 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2015-01-07 12:21:22 +0100
commitebf8f5d16faa4c3b15bb8541ee7764d650a7dbb1 (patch)
tree3173ab797eb54ac2aaf4fa8eb76747a2e1108440 /scripts
parentfc23a9bd5012d07cc6ef9d1eba12f320763068d9 (diff)
git-serve.py: Allow TUs to push to any repository
Implements FS#32807. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/git-integration/git-serve.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py
index d551dba..227e37b 100755
--- a/scripts/git-integration/git-serve.py
+++ b/scripts/git-integration/git-serve.py
@@ -92,6 +92,10 @@ 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:
+ return True
+
cur.execute("SELECT COUNT(*) FROM PackageBases " +
"LEFT JOIN PackageComaintainers " +
"ON PackageComaintainers.PackageBaseID = PackageBases.ID " +