[aur-dev] [PATCH] git-serve.py: Allow TUs to push to any repository
Implements FS#32807. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- scripts/git-integration/git-serve.py | 4 ++++ 1 file changed, 4 insertions(+) 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 " + -- 2.2.1
participants (1)
-
Lukas Fleischer