diff options
Diffstat (limited to 'scripts/git-integration/git-serve.py')
-rwxr-xr-x | scripts/git-integration/git-serve.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/scripts/git-integration/git-serve.py b/scripts/git-integration/git-serve.py index a1c6e3a1..d551dba4 100755 --- a/scripts/git-integration/git-serve.py +++ b/scripts/git-integration/git-serve.py @@ -92,10 +92,13 @@ def check_permissions(pkgbase, user): unix_socket=aur_db_socket, buffered=True) cur = db.cursor() - cur.execute("SELECT COUNT(*) FROM PackageBases INNER JOIN Users " + - "ON Users.ID = PackageBases.MaintainerUID OR " + - "PackageBases.MaintainerUID IS NULL WHERE " + - "Name = %s AND Username = %s", [pkgbase, user]) + cur.execute("SELECT COUNT(*) FROM PackageBases " + + "LEFT JOIN PackageComaintainers " + + "ON PackageComaintainers.PackageBaseID = PackageBases.ID " + + "INNER JOIN Users ON Users.ID = PackageBases.MaintainerUID " + + "OR PackageBases.MaintainerUID IS NULL " + + "OR Users.ID = PackageComaintainers.UsersID " + + "WHERE Name = %s AND Username = %s", [pkgbase, user]) return cur.fetchone()[0] > 0 def die(msg): |