Merge pull request #881 from scholtalbers/role-page-fix

Fix the issue where too many datasets are linked to a certain role
This commit is contained in:
John Chilton
2015-11-18 13:46:29 -05:00
+4 -1
View File
@@ -313,7 +313,7 @@ class Admin( object ):
else:
out_groups.append( ( group.id, group.name ) )
library_dataset_actions = {}
if trans.webapp.name == 'galaxy':
if trans.webapp.name == 'galaxy' and len(role.dataset_actions) < 25:
# Build a list of tuples that are LibraryDatasetDatasetAssociationss followed by a list of actions
# whose DatasetPermissions is associated with the Role
# [ ( LibraryDatasetDatasetAssociation [ action, action ] ) ]
@@ -339,6 +339,9 @@ class Admin( object ):
library_dataset_actions[ library ][ folder_path ].append( dp.action )
except:
library_dataset_actions[ library ][ folder_path ] = [ dp.action ]
else:
message = "Not showing associated datasets, there are too many."
status = 'info'
return trans.fill_template( '/admin/dataset_security/role/role.mako',
role=role,
in_users=in_users,