Commit d13ad025 authored by marc duez's avatar marc duez

migrator.py : select sample_set with valid permission on sample_set table and...

migrator.py : select sample_set with valid permission on sample_set table and not only on patient/generic/run tables

permission for sample_set seem to have changed over time and can be found on both
parent 79c4159d
......@@ -154,8 +154,12 @@ class GroupExtractor(Extractor):
def getAccessible(self, table, groupid):
db = self.db
rows = db((db[table].id == db.auth_permission.record_id)
& (db.auth_permission.table_name == table)
rows = db((((db[table].id == db.auth_permission.record_id)
& (db.auth_permission.table_name == table))
| ((db.sample_set.id == db.auth_permission.record_id)
& (db.sample_set.id == db[table].sample_set_id)
& (db.auth_permission.table_name == "sample_set")))
& (db.auth_permission.name == PermissionEnum.access.value)
& (db.auth_permission.group_id == groupid)
).select(db[table].ALL)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment