Only allow errors to be viewed if the user can access the dataset.

This commit is contained in:
Daniel Blankenberg
2012-10-11 14:06:10 -04:00
parent 4a622c6a8d
commit ad9bb6382b
@@ -166,6 +166,8 @@ class DatasetInterface( BaseUIController, UsesAnnotations, UsesHistoryMixin, Use
@web.expose
def errors( self, trans, id ):
hda = trans.sa_session.query( model.HistoryDatasetAssociation ).get( id )
if not hda or not trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ):
return trans.show_error_message( "Either this dataset does not exist or you do not have permission to access it." )
return trans.fill_template( "dataset/errors.mako", hda=hda )
@web.expose
def stdoutX( self, trans, dataset_id=None, **kwargs ):