Skip to content

Commit

Permalink
Merge pull request #2020 from DFE-Digital/no-skip-verify
Browse files Browse the repository at this point in the history
Track history on each controller
  • Loading branch information
thomasleese authored Feb 20, 2024
2 parents 3c7e810 + 4692daf commit 88971b5
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ApplicationFormsController < BaseController
include HistoryTrackable

before_action only: %i[index apply_filters clear_filters] do
authorize %i[assessor_interface application_form]
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationAwardController < BaseController
include HistoryTrackable

before_action :ensure_can_award
before_action :load_assessment_and_application_form
before_action :load_important_notes, only: %i[edit update]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationDeclineController < BaseController
include HistoryTrackable

before_action :ensure_can_decline
before_action :load_assessment_and_application_form

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationReviewController < BaseController
include HistoryTrackable

before_action :ensure_can_review
before_action :load_assessment_and_application_form

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentRecommendationVerifyController < BaseController
include HistoryTrackable

before_action :ensure_can_verify
before_action :load_assessment_and_application_form

Expand Down Expand Up @@ -72,8 +74,8 @@ def update_verify_qualifications
redirect_to [
:qualification_requests,
:assessor_interface,
@application_form,
@assessment,
application_form,
assessment,
:assessment_recommendation_verify,
]
elsif (check_path = history_stack.last_path_if_check)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentSectionsController < BaseController
include HistoryTrackable

before_action { authorize [:assessor_interface, assessment_section] }

def show
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/assessor_interface/assessments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessmentsController < BaseController
include HistoryTrackable

before_action :load_assessment_and_application_form

before_action only: %i[edit update] do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class AssessorAssignmentsController < BaseController
include HistoryTrackable

before_action { authorize %i[assessor_interface staff_assignment] }

def new
Expand Down
1 change: 0 additions & 1 deletion app/controllers/assessor_interface/base_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

class AssessorInterface::BaseController < ApplicationController
include AssessorCurrentNamespace
include HistoryTrackable
include StaffAuthenticatable

after_action :verify_authorized
Expand Down
1 change: 1 addition & 0 deletions app/controllers/assessor_interface/documents_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module AssessorInterface
class DocumentsController < BaseController
include ActiveStorage::Streaming
include HistoryTrackable
include StreamedResponseAuthenticatable
include RescueActiveStorageErrors
include UploadHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class FurtherInformationRequestsController < BaseController
include HistoryTrackable

before_action only: %i[preview new create] do
authorize %i[assessor_interface further_information_request]
end
Expand Down
2 changes: 2 additions & 0 deletions app/controllers/assessor_interface/notes_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class NotesController < BaseController
include HistoryTrackable

before_action { authorize %i[assessor_interface note] }

def new
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ProfessionalStandingRequestsController < BaseController
include HistoryTrackable

before_action :set_variables

before_action do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class QualificationRequestsController < BaseController
include HistoryTrackable

before_action :set_collection_variables, only: %i[index consent_letter]
before_action :set_member_variables, except: %i[index consent_letter]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ReferenceRequestsController < BaseController
include HistoryTrackable

before_action :set_individual_variables, except: :index

define_history_origin :index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class ReviewerAssignmentsController < BaseController
include HistoryTrackable

before_action { authorize %i[assessor_interface staff_assignment] }

def new
Expand Down
1 change: 1 addition & 0 deletions app/controllers/assessor_interface/uploads_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module AssessorInterface
class UploadsController < BaseController
include ActiveStorage::Streaming
include HistoryTrackable
include StreamedResponseAuthenticatable
include RescueActiveStorageErrors
include UploadHelper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

module AssessorInterface
class WorkHistoriesController < BaseController
include HistoryTrackable

before_action { authorize [:assessor_interface, work_history] }

def edit
Expand Down

0 comments on commit 88971b5

Please sign in to comment.