# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User Greg Von Kuster <greg@bx.psu.edu> # Date 1289046578 14400 # Node ID d46ccc650084224553b3b48c11df64d43d7673ef # Parent 702f4717a8f3fe38758c54136f81935f7679c937 Eliminate check_user flag from tool menu and workflow methods. --- a/lib/galaxy/web/controllers/workflow.py +++ b/lib/galaxy/web/controllers/workflow.py @@ -1206,14 +1206,13 @@ class WorkflowController( BaseController ## % ( workflow_name, web.url_for( action='editor', id=trans.security.encode_id(stored.id) ) ) ) @web.expose - def run( self, trans, id, check_user=True, **kwargs ): + def run( self, trans, id, **kwargs ): stored = self.get_stored_workflow( trans, id, check_ownership=False ) - if check_user: - user = trans.get_user() - if stored.user != user: - if trans.sa_session.query( model.StoredWorkflowUserShareAssociation ) \ - .filter_by( user=user, stored_workflow=stored ).count() == 0: - error( "Workflow is not owned by or shared with current user" ) + user = trans.get_user() + if stored.user != user: + if trans.sa_session.query( model.StoredWorkflowUserShareAssociation ) \ + .filter_by( user=user, stored_workflow=stored ).count() == 0: + error( "Workflow is not owned by or shared with current user" ) # Get the latest revision workflow = stored.latest_workflow # It is possible for a workflow to have 0 steps @@ -1343,14 +1342,13 @@ class WorkflowController( BaseController incoming=kwargs ) @web.expose - def tag_outputs( self, trans, id, check_user=True, **kwargs ): + def tag_outputs( self, trans, id, **kwargs ): stored = self.get_stored_workflow( trans, id, check_ownership=False ) - if check_user: - user = trans.get_user() - if stored.user != user: - if trans.sa_session.query( model.StoredWorkflowUserShareAssociation ) \ - .filter_by( user=user, stored_workflow=stored ).count() == 0: - error( "Workflow is not owned by or shared with current user" ) + user = trans.get_user() + if stored.user != user: + if trans.sa_session.query( model.StoredWorkflowUserShareAssociation ) \ + .filter_by( user=user, stored_workflow=stored ).count() == 0: + error( "Workflow is not owned by or shared with current user" ) # Get the latest revision workflow = stored.latest_workflow # It is possible for a workflow to have 0 steps --- a/templates/root/tool_menu.mako +++ b/templates/root/tool_menu.mako @@ -32,7 +32,7 @@ <div class="toolTitleNoSection"> %endif <% encoded_id = key.lstrip( 'workflow_' ) %> - <a id="link-${workflow.id}" href="${ h.url_for( controller='workflow', action='run', id=encoded_id, check_user=False )}" target="_parent">${_(workflow.name)}</a> + <a id="link-${workflow.id}" href="${ h.url_for( controller='workflow', action='run', id=encoded_id )}" target="_parent">${_(workflow.name)}</a></div></%def>