提交 a3380f76 编写于 作者: A Ansgar Burchardt

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.
上级 236dfee4
......@@ -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:<uid>
name:<name>
fpr:<fingerprint>
keyring:<keyring-name>
@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()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册