From 263c4b89407e0b20c479bbdd31fc14c380ebe118 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Mon, 24 Sep 2012 21:29:43 +0200 Subject: [PATCH] dak/acl.py: include fingerprint of person who granted upload permission Bug: http://bugs.debian.org/688490 --- dak/acl.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.39.5