mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Merge pull request #1953 from mvdbeek/warn_if_user_inactive
Warn if tool is executed and user account is inactive
This commit is contained in:
@@ -186,7 +186,7 @@ class JobHandlerQueue( object ):
|
||||
jobs (either from the database or from its own queue), then iterates
|
||||
over all new and waiting jobs to check the state of the jobs each
|
||||
depends on. If the job has dependencies that have not finished, it
|
||||
it goes to the waiting queue. If the job has dependencies with errors,
|
||||
goes to the waiting queue. If the job has dependencies with errors,
|
||||
it is marked as having errors and removed from the queue. If the job
|
||||
belongs to an inactive user it is ignored.
|
||||
Otherwise, the job is dispatched.
|
||||
|
||||
@@ -218,6 +218,11 @@ class ToolsController( BaseAPIController, UsesVisualizationMixin ):
|
||||
tool = trans.app.toolbox.get_tool( payload[ 'tool_id' ] , tool_version ) if 'tool_id' in payload else None
|
||||
if not tool or not tool.allow_user_access( trans.user ):
|
||||
raise exceptions.MessageException( 'Tool not found or not accessible.' )
|
||||
if trans.app.config.user_activation_on:
|
||||
if not trans.user:
|
||||
log.warning( "Anonymous user attempts to execute tool, but account activation is turned on." )
|
||||
elif not trans.user.active:
|
||||
log.warning( "User \"%s\" attempts to execute tool, but account activation is turned on and user account is not active." % trans.user.email )
|
||||
|
||||
# Set running history from payload parameters.
|
||||
# History not set correctly as part of this API call for
|
||||
|
||||
Reference in New Issue
Block a user