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")
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,