Clean up AnalysisTasksController by introducing a before_action.
More DRY in the AnalysisTasksController.