From: Ansgar Burchardt Date: Sun, 27 Jan 2013 12:50:40 +0000 (+0100) Subject: dak/acl.py: only add fingerprints from active keyrings to an ACL. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=97e241882639b57e62d432b3c449ef20f72270ab;p=dak dak/acl.py: only add fingerprints from active keyrings to an ACL. --- 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))