From 1321b77d07db1c22cd028c83937817ede40479a9 Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sun, 16 Sep 2012 23:31:23 +0200 Subject: [PATCH] dak/admin.py: make 'keyring list-(binary|source)' work with new ACLs --- dak/admin.py | 4 ++-- daklib/dbconn.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) 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, -- 2.39.5