Skip to content

Commit

Permalink
optimize the admin query
Browse files Browse the repository at this point in the history
  • Loading branch information
martenson committed Oct 23, 2017
1 parent f673761 commit 7e66717
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/managers/library_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,12 @@ def serialize(self, trans, ld):
rval['full_path'] = full_path
rval['file_size'] = util.nice_size(int(ldda.get_size()))
rval['date_uploaded'] = ldda.create_time.strftime("%Y-%m-%d %I:%M %p")
rval['can_user_modify'] = trans.app.security_agent.can_modify_library_item(current_user_roles, ld) or trans.user_is_admin()
rval['can_user_modify'] = trans.user_is_admin() or trans.app.security_agent.can_modify_library_item(current_user_roles, ld)
rval['is_unrestricted'] = trans.app.security_agent.dataset_is_public(ldda.dataset)
rval['tags'] = self.tag_manager.get_tags_str(ldda.tags)

# Manage dataset permission is always attached to the dataset itself, not the the ld or ldda to maintain consistency
rval['can_user_manage'] = trans.app.security_agent.can_manage_dataset(current_user_roles, ldda.dataset) or trans.user_is_admin()
rval['can_user_manage'] = trans.user_is_admin() or trans.app.security_agent.can_manage_dataset(current_user_roles, ldda.dataset)
return rval

def _build_path(self, trans, folder):
Expand Down

0 comments on commit 7e66717

Please sign in to comment.