From: Ansgar Burchardt Date: Mon, 24 Sep 2012 19:29:43 +0000 (+0200) Subject: dak/acl.py: include fingerprint of person who granted upload permission X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=263c4b89407e0b20c479bbdd31fc14c380ebe118;p=dak.git dak/acl.py: include fingerprint of person who granted upload permission Bug: http://bugs.debian.org/688490 --- diff --git a/dak/acl.py b/dak/acl.py index 568e21e4..e19b2691 100644 --- a/dak/acl.py +++ b/dak/acl.py @@ -84,14 +84,17 @@ def acl_export_per_source(acl_name): session = DBConn().session() acl = session.query(ACL).filter_by(name=acl_name).one() - query = """ + query = r""" SELECT f.fingerprint, (SELECT COALESCE(u.name, '') || ' <' || u.uid || '>' FROM uid u JOIN fingerprint f2 ON u.id = f2.uid WHERE f2.id = f.id) AS name, - STRING_AGG(a.source, ' ' ORDER BY a.source) + STRING_AGG( + a.source + || COALESCE(' (' || (SELECT fingerprint FROM fingerprint WHERE id = a.created_by_id) || ')', ''), + E',\n ' ORDER BY a.source) FROM acl_per_source a JOIN fingerprint f ON a.fingerprint_id = f.id LEFT JOIN uid u ON f.uid = u.id