## NULL means no source upload access (i.e. any upload containing source
## will be rejected)
- c.execute("ALTER TABLE fingerprint ADD COLUMN source_acl INT4 REFERENCES source_acl(id) DEFAULT NULL")
+ c.execute("ALTER TABLE fingerprint ADD COLUMN source_acl_id INT4 REFERENCES source_acl(id) DEFAULT NULL")
## NULL means no binary upload access
- c.execute("ALTER TABLE fingerprint ADD COLUMN binary_acl INT4 REFERENCES binary_acl(id) DEFAULT NULL")
+ c.execute("ALTER TABLE fingerprint ADD COLUMN binary_acl_id INT4 REFERENCES binary_acl(id) DEFAULT NULL")
# Blockage table (replaces the hard coded stuff we used to have in extensions)
print "Adding blockage table"
def __init__(self, *args, **kwargs):
pass
+ def __repr__(self):
+ return '<BinaryACL %s>' % self.binary_acl_id
+
__all__.append('BinaryACL')
################################################################################
def __init__(self, *args, **kwargs):
pass
+ def __repr__(self):
+ return '<BinaryACLMap %s>' % self.binary_acl_map_id
+
__all__.append('BinaryACLMap')
################################################################################
def __init__(self, *args, **kwargs):
pass
+ def __repr__(self):
+ return '<SourceACL %s>' % self.source_acl_id
+
__all__.append('SourceACL')
################################################################################
def __init__(self, *args, **kwargs):
pass
+ def __repr__(self):
+ return '<UploadBlock %s (%s)>' % (self.source, self.upload_block_id)
+
__all__.append('UploadBlock')
################################################################################
properties = dict(binary_acl_id = self.tbl_binary_acl.c.id))
mapper(BinaryACLMap, self.tbl_binary_acl_map,
- properties = dict(binary_acl_map_id = self.tbl_binary_acl_map.c.id))
+ properties = dict(binary_acl_map_id = self.tbl_binary_acl_map.c.id,
+ fingerprint = relation(Fingerprint, backref="binary_acl_map"),
+ architecture = relation(Architecture)))
mapper(Component, self.tbl_component,
properties = dict(component_id = self.tbl_component.c.id,
uid_id = self.tbl_fingerprint.c.uid,
uid = relation(Uid),
keyring_id = self.tbl_fingerprint.c.keyring,
- keyring = relation(Keyring)))
+ keyring = relation(Keyring),
+ source_acl = relation(SourceACL),
+ binary_acl = relation(BinaryACL)))
mapper(Keyring, self.tbl_keyrings,
properties = dict(keyring_name = self.tbl_keyrings.c.name,
fingerprint = relation(Fingerprint)))
mapper(UploadBlock, self.tbl_upload_blocks,
- properties = dict(upload_block_id = self.tbl_upload_blocks.c.id))
+ properties = dict(upload_block_id = self.tbl_upload_blocks.c.id,
+ fingerprint = relation(Fingerprint, backref="uploadblocks"),
+ uid = relation(Uid, backref="uploadblocks")))
## Connection functions
def __createconn(self):