From: Ansgar Burchardt Date: Sun, 16 Sep 2012 21:31:23 +0000 (+0200) Subject: dak/admin.py: make 'keyring list-(binary|source)' work with new ACLs X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1321b77d07db1c22cd028c83937817ede40479a9;p=dak dak/admin.py: make 'keyring list-(binary|source)' work with new ACLs --- diff --git a/dak/admin.py b/dak/admin.py index c77e93f3..798aa3b7 100755 --- a/dak/admin.py +++ b/dak/admin.py @@ -584,9 +584,9 @@ def show_keyring(command): if mode == 'list-all': pass elif mode == 'list-binary': - q = q.filter(Keyring.default_source_acl_id == None) + q = q.join(Keyring.acl).filter(ACL.allow_source == False) elif mode == 'list-source': - q = q.filter(Keyring.default_source_acl_id != None) + q = q.join(Keyring.acl).filter(ACL.allow_source == True) else: die("E: keyring command unknown") diff --git a/daklib/dbconn.py b/daklib/dbconn.py index 9617bb77..41121fff 100644 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -2687,7 +2687,8 @@ class DBConn(object): mapper(Keyring, self.tbl_keyrings, properties = dict(keyring_name = self.tbl_keyrings.c.name, - keyring_id = self.tbl_keyrings.c.id)) + keyring_id = self.tbl_keyrings.c.id, + acl = relation(ACL, primaryjoin=(self.tbl_keyrings.c.acl_id == self.tbl_acl.c.id)))), mapper(DBChange, self.tbl_changes, properties = dict(change_id = self.tbl_changes.c.id,