Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 3e45297f authored by Ryan Herbert's avatar Ryan Herbert

models/ fix auth context get_group_list

using "current" seemingly caused an issue with the get_group_list in
tests. Perhaps some kind of context difference between the auth instance
in current and that used in the test.
parent 84fdb5fe
......@@ -70,7 +70,7 @@ class SampleSet(object):
fields.append({'name': 'name', 'sort': 'name', 'call': self.get_name, 'width': 200, 'public': True})
fields.append({'name': 'info', 'sort': 'info', 'call': self.get_tagged_info, 'width': None, 'public': True})
fields.append({'name': 'results', 'sort': 'confs', 'call': self.get_config_urls, 'width': None, 'public': True})
if auth.is_admin() or len(get_group_list()) > 1:
if auth.is_admin() or len(get_group_list(auth)) > 1:
fields.append({'name': 'groups', 'sort': 'groups', 'call': self.get_groups_string, 'width': 100, 'public': True})
fields.append({'name': 'creator', 'sort': 'creator', 'call': self.get_creator, 'width': 100, 'public': True})
fields.append({'name': 'files', 'sort': 'file_count', 'call': self.get_files, 'width': 100, 'public': True})
from gluon import current
def get_group_list():
auth = current.auth
def get_group_list(auth):
if (auth.is_admin()):
return db(db.auth_group).select(, db.auth_group.role)
......@@ -15,7 +12,7 @@ def get_default_creation_group(auth):
max_group = auth.user_group()
group_dict = {}
max_elements = 0
group_list = get_group_list()
group_list = get_group_list(auth)
for group in group_list:
if (auth.is_admin()
or auth.has_permission(PermissionEnum.create.value, 'sample_set', 0, group_id =
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