[hg] galaxy 2627: Fix for importing a shared history via a link ...
details: http://www.bx.psu.edu/hg/galaxy/rev/03accd13066e changeset: 2627:03accd13066e user: Greg Von Kuster <greg@bx.psu.edu> date: Tue Aug 25 16:59:28 2009 -0400 description: Fix for importing a shared history via a link if not logged in. 1 file(s) affected in this change: lib/galaxy/web/controllers/history.py diffs (21 lines): diff -r 4759e4bd03aa -r 03accd13066e lib/galaxy/web/controllers/history.py --- a/lib/galaxy/web/controllers/history.py Tue Aug 25 16:35:11 2009 -0400 +++ b/lib/galaxy/web/controllers/history.py Tue Aug 25 16:59:28 2009 -0400 @@ -738,10 +738,11 @@ history = trans.sa_session.query( model.History ).get( id ) if not history: err+msg( "History not found" ) - # Verify ownership - user = trans.get_user() - if not user: - error( "Must be logged in to manage histories" ) - if check_ownership and not( history.user == user ): - error( "History is not owned by current user" ) + if check_ownership: + # Verify ownership + user = trans.get_user() + if not user: + error( "Must be logged in to manage histories" ) + if history.user != user: + error( "History is not owned by current user" ) return history
participants (1)
-
Greg Von Kuster