Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit a12ba46c authored by Ryan Herbert's avatar Ryan Herbert Committed by Mikaël Salson

add permissions and anon to single query

parent d0e1d58d
......@@ -11,7 +11,16 @@ class SampleSetList():
left = [db.sample_set_membership.on(s_table.sample_set_id == db.sample_set_membership.sample_set_id),
db.sequence_file.on(db.sample_set_membership.sequence_file_id == db.sequence_file.id),
db.fused_file.on(s_table.sample_set_id == db.fused_file.sample_set_id),
db.config.on(db.fused_file.config_id == db.config.id)
db.config.on(db.fused_file.config_id == db.config.id),
db.auth_permission.on((db.auth_permission.table_name == 'sample_set') & (db.auth_permission.record_id == s_table.sample_set_id) & (db.auth_permission.name == PermissionEnum.access.value)),
db.auth_group.on(db.auth_permission.group_id == db.auth_group.id),
db.auth_permission.with_alias('anon_permission').on(
(db.anon_permission.table_name == self.type) &
(db.anon_permission.name == "anon") &
(db.anon_permission.record_id == s_table.id) &
(db.auth_group.id == db.anon_permission.group_id ) &
(db.auth_membership.user_id == auth.user_id) &
(db.auth_membership.group_id == db.auth_group.id))
]
group_configs = get_conf_list_select()
......
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