From a3380f76fd64a8832c8cc27f759b6da8d2d44bd3 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sun, 27 Jan 2013 11:50:38 +0100 Subject: [PATCH] dak/acl.py: allow to filter by keyring This is intended to be used for the backports ACL to allow all buildd keys to upload. --- dak/acl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dak/acl.py b/dak/acl.py index e19b2691..aa73890d 100644 --- a/dak/acl.py +++ b/dak/acl.py @@ -20,7 +20,7 @@ import apt_pkg import sys from daklib.config import Config -from daklib.dbconn import DBConn, Fingerprint, Uid, ACL +from daklib.dbconn import DBConn, Fingerprint, Keyring, Uid, ACL def usage(): print """Usage: @@ -44,6 +44,7 @@ def get_fingerprint(entry, session): uid: name: fpr: + keyring: @type entry: string @param entry: ACL entry @@ -62,6 +63,8 @@ def get_fingerprint(entry, session): q = q.join(Fingerprint.uid).filter(Uid.name == value) elif field == 'fpr': q = q.filter(Fingerprint.fingerprint == value) + elif field == 'keyring': + q = q.join(Fingerprint.keyring).filter(Keyring.keyring_name == value) return q.all() -- 2.39.2