From 97e241882639b57e62d432b3c449ef20f72270ab Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sun, 27 Jan 2013 13:50:40 +0100 Subject: [PATCH] dak/acl.py: only add fingerprints from active keyrings to an ACL. --- dak/acl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dak/acl.py b/dak/acl.py index 10a63729..a6fdddd9 100644 --- a/dak/acl.py +++ b/dak/acl.py @@ -55,7 +55,7 @@ def get_fingerprint(entry, session): @return: fingerprint for the entry """ field, value = entry.split(":", 1) - q = session.query(Fingerprint) + q = session.query(Fingerprint).join(Fingerprint.keyring).filter(Keyring.active == True) if field == 'uid': q = q.join(Fingerprint.uid).filter(Uid.uid == value) @@ -64,7 +64,7 @@ def get_fingerprint(entry, session): elif field == 'fpr': q = q.filter(Fingerprint.fingerprint == value) elif field == 'keyring': - q = q.join(Fingerprint.keyring).filter(Keyring.keyring_name == value) + q = q.filter(Keyring.keyring_name == value) else: raise Exception('Unknown selector "{0}".'.format(field)) -- 2.39.5