diff --git a/app/controllers/claims_controller.rb b/app/controllers/claims_controller.rb
index 48c578d128..2813617f68 100644
--- a/app/controllers/claims_controller.rb
+++ b/app/controllers/claims_controller.rb
@@ -12,6 +12,7 @@ class ClaimsController < BasePublicController
before_action :persist_claim, only: [:new, :create]
before_action :handle_magic_link, only: [:new], if: -> { journey.start_with_magic_link? }
+ include AuthorisedSlugs
include FormSubmittable
include ClaimsFormCallbacks
diff --git a/app/controllers/concerns/authorised_slugs.rb b/app/controllers/concerns/authorised_slugs.rb
new file mode 100644
index 0000000000..540ba9d4d5
--- /dev/null
+++ b/app/controllers/concerns/authorised_slugs.rb
@@ -0,0 +1,29 @@
+module AuthorisedSlugs
+ extend ActiveSupport::Concern
+
+ included do
+ before_action :authorise_slug!
+ end
+
+ def authorise_slug!
+ if page_sequence.requires_authorisation?(current_slug) && !authorised?
+ redirect_to(
+ page_sequence.unauthorised_path(
+ current_slug,
+ authorisation.failure_reason
+ )
+ )
+ end
+ end
+
+ def authorised?
+ authorisation.failure_reason.nil?
+ end
+
+ def authorisation
+ journey::Authorisation.new(
+ answers: journey_session.answers,
+ slug: current_slug
+ )
+ end
+end
diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb
index 7d1ad597cd..35145faabb 100644
--- a/app/controllers/omniauth_callbacks_controller.rb
+++ b/app/controllers/omniauth_callbacks_controller.rb
@@ -6,21 +6,14 @@ class OmniauthCallbacksController < ApplicationController
def callback
auth = request.env["omniauth.auth"]
- # Only keep the attributes permitted by the form
- teacher_id_user_info_attributes = auth.extra.raw_info.to_h.slice(
- *SignInOrContinueForm::TeacherIdUserInfoForm::DFE_IDENTITY_ATTRIBUTES.map(&:to_s)
- )
-
- redirect_to(
- claim_path(
- journey: current_journey_routing_name,
- slug: "sign-in-or-continue",
- claim: {
- logged_in_with_tid: true,
- teacher_id_user_info_attributes: teacher_id_user_info_attributes
- }
- )
- )
+ case params[:journey]
+ when "further-education-payments-provider"
+ further_education_payments_provider_callback(auth)
+ else
+ # The callback route for student loans and additional payments isn't
+ # namespaced under a journey
+ additional_payments_callback(auth)
+ end
end
def failure
@@ -128,4 +121,38 @@ def omniauth_hash
request.env["omniauth.auth"]
end
end
+
+ def further_education_payments_provider_callback(auth)
+ Journeys::FurtherEducationPayments::Provider::OmniauthCallbackForm.new(
+ journey_session: journey_session,
+ auth: auth
+ ).save!
+
+ session[:slugs] << "sign-in"
+
+ redirect_to(
+ claim_path(
+ journey: current_journey_routing_name,
+ slug: "verify-claim"
+ )
+ )
+ end
+
+ def additional_payments_callback(auth)
+ # Only keep the attributes permitted by the form
+ teacher_id_user_info_attributes = auth.extra.raw_info.to_h.slice(
+ *SignInOrContinueForm::TeacherIdUserInfoForm::DFE_IDENTITY_ATTRIBUTES.map(&:to_s)
+ )
+
+ redirect_to(
+ claim_path(
+ journey: current_journey_routing_name,
+ slug: "sign-in-or-continue",
+ claim: {
+ logged_in_with_tid: true,
+ teacher_id_user_info_attributes: teacher_id_user_info_attributes
+ }
+ )
+ )
+ end
end
diff --git a/app/forms/journeys/further_education_payments/provider/claim_submission_form.rb b/app/forms/journeys/further_education_payments/provider/claim_submission_form.rb
new file mode 100644
index 0000000000..42974dc726
--- /dev/null
+++ b/app/forms/journeys/further_education_payments/provider/claim_submission_form.rb
@@ -0,0 +1,17 @@
+# Required to get page sequence to think this is a "normal" journey
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class ClaimSubmissionForm
+ def initialize(journey_session)
+ @journey_session = journey_session
+ end
+
+ # We don't want page sequence to redirect us
+ def valid?
+ false
+ end
+ end
+ end
+ end
+end
diff --git a/app/forms/journeys/further_education_payments/provider/omniauth_callback_form.rb b/app/forms/journeys/further_education_payments/provider/omniauth_callback_form.rb
new file mode 100644
index 0000000000..d433e341df
--- /dev/null
+++ b/app/forms/journeys/further_education_payments/provider/omniauth_callback_form.rb
@@ -0,0 +1,72 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class OmniauthCallbackForm
+ def initialize(journey_session:, auth:)
+ @journey_session = journey_session
+ @auth = auth
+ end
+
+ def save!
+ journey_session.answers.assign_attributes(
+ dfe_sign_in_uid: dfe_sign_in_uid,
+ dfe_sign_in_organisation_id: dfe_sign_in_organisation_id,
+ dfe_sign_in_organisation_ukprn: dfe_sign_in_organisation_ukprn,
+ dfe_sign_in_service_access: dfe_sign_in_service_access?,
+ dfe_sign_in_role_codes: dfe_sign_in_role_codes,
+ dfe_sign_in_first_name: dfe_sign_in_first_name,
+ dfe_sign_in_last_name: dfe_sign_in_last_name,
+ dfe_sign_in_email: dfe_sign_in_email
+ )
+
+ journey_session.save!
+ end
+
+ private
+
+ attr_reader :journey_session, :auth
+
+ def dfe_sign_in_uid
+ auth["uid"]
+ end
+
+ def dfe_sign_in_organisation_ukprn
+ auth.dig("extra", "raw_info", "organisation", "ukprn")
+ end
+
+ def dfe_sign_in_organisation_id
+ auth.dig("extra", "raw_info", "organisation", "id")
+ end
+
+ def dfe_sign_in_service_access?
+ dfe_sign_in_user.service_access?
+ end
+
+ def dfe_sign_in_user
+ @dfe_sign_in_user ||= DfeSignIn::Api::User.new(
+ organisation_id: dfe_sign_in_organisation_id,
+ user_id: dfe_sign_in_uid
+ )
+ end
+
+ def dfe_sign_in_role_codes
+ return [] unless dfe_sign_in_service_access?
+
+ dfe_sign_in_user.role_codes
+ end
+
+ def dfe_sign_in_first_name
+ auth.dig("info", "first_name")
+ end
+
+ def dfe_sign_in_last_name
+ auth.dig("info", "last_name")
+ end
+
+ def dfe_sign_in_email
+ auth.dig("info", "email")
+ end
+ end
+ end
+ end
+end
diff --git a/app/forms/journeys/further_education_payments/provider/session_form.rb b/app/forms/journeys/further_education_payments/provider/session_form.rb
new file mode 100644
index 0000000000..6396c86954
--- /dev/null
+++ b/app/forms/journeys/further_education_payments/provider/session_form.rb
@@ -0,0 +1,9 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class SessionForm < Journeys::SessionForm
+ attribute :claim_id, :string
+ end
+ end
+ end
+end
diff --git a/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb b/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb
new file mode 100644
index 0000000000..8e9d21a8ae
--- /dev/null
+++ b/app/forms/journeys/further_education_payments/provider/verify_claim_form.rb
@@ -0,0 +1,156 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class VerifyClaimForm < Form
+ include CoursesHelper
+
+ ASSERTIONS = {
+ fixed_contract: %i[
+ contract_type
+ teaching_responsibilities
+ further_education_teaching_start_year
+ teaching_hours_per_week
+ hours_teaching_eligible_subjects
+ subjects_taught
+ ],
+ variable_contract: %i[
+ contract_type
+ teaching_responsibilities
+ further_education_teaching_start_year
+ taught_at_least_one_term
+ teaching_hours_per_week
+ hours_teaching_eligible_subjects
+ subjects_taught
+ teaching_hours_per_week_next_term
+ ]
+ }
+
+ attribute :assertions_attributes
+
+ attribute :declaration, :boolean
+
+ validates :declaration, acceptance: true
+
+ validate :all_assertions_answered
+
+ validate :claim_not_already_verified
+
+ delegate :claim, to: :answers
+
+ def claim_reference
+ claim.reference
+ end
+
+ def claimant_name
+ claim.full_name
+ end
+
+ def claimant_date_of_birth
+ claim.date_of_birth.strftime("%-d %B %Y")
+ end
+
+ def claimant_trn
+ claim.eligibility.teacher_reference_number
+ end
+
+ def claim_date
+ claim.created_at.to_date.strftime("%-d %B %Y")
+ end
+
+ def course_descriptions
+ @course_descriptions ||= claim.eligibility.courses_taught.map(&:description)
+ end
+
+ def assertions
+ @assertions ||= ASSERTIONS.fetch(contract_type).map do |assertion_name|
+ AssertionForm.new(name: assertion_name)
+ end
+ end
+
+ def assertions_attributes=(params)
+ (params || {}).each do |_, assertion_params|
+ assertions
+ .detect { |a| a.name == assertion_params[:name] }
+ &.assign_attributes(assertion_params)
+ end
+ end
+
+ def save
+ return false unless valid?
+
+ claim.eligibility.update!(
+ verification: {
+ assertions: assertions.map(&:attributes),
+ verifier: {
+ dfe_sign_in_uid: answers.dfe_sign_in_uid,
+ first_name: answers.dfe_sign_in_first_name,
+ last_name: answers.dfe_sign_in_last_name,
+ email: answers.dfe_sign_in_email
+ },
+ created_at: DateTime.now
+ }
+ )
+
+ claim.save!
+
+ true
+ end
+
+ def contract_type
+ if claim.eligibility.fixed_contract?
+ :fixed_contract
+ else
+ :variable_contract
+ end
+ end
+
+ private
+
+ def permitted_attributes
+ super + [assertions_attributes: AssertionForm.attribute_names]
+ end
+
+ # Make sure the errors in the summary link to the correct nested field
+ def all_assertions_answered
+ assertions.each(&:validate).each_with_index do |assertion, i|
+ assertion.errors.each do |error|
+ errors.add(
+ "assertions_attributes[#{i}][#{error.attribute}]",
+ error.full_message
+ )
+ end
+ end
+ end
+
+ def claim_not_already_verified
+ if claim.eligibility.verified?
+ errors.add(:base, "Claim has already been verified")
+ end
+ end
+
+ class AssertionForm
+ include ActiveModel::Model
+ include ActiveModel::Attributes
+
+ attribute :name, :string
+ attribute :outcome, :boolean
+
+ validates :name, presence: true
+ validates :outcome, inclusion: {
+ in: [true, false],
+ message: "Select an option"
+ }
+
+ def radio_options
+ [
+ RadioOption.new(id: true, name: "Yes"),
+ RadioOption.new(id: false, name: "No")
+ ]
+ end
+
+ class RadioOption < Struct.new(:id, :name, keyword_init: true); end
+ end
+ end
+ end
+ end
+end
diff --git a/app/models/journeys.rb b/app/models/journeys.rb
index 1e8159125d..14f48c25ae 100644
--- a/app/models/journeys.rb
+++ b/app/models/journeys.rb
@@ -10,6 +10,7 @@ def self.table_name_prefix
TeacherStudentLoanReimbursement,
GetATeacherRelocationPayment,
FurtherEducationPayments,
+ FurtherEducationPayments::Provider,
EarlyYearsPayment::Provider::Start,
EarlyYearsPayment::Provider::Authenticated
].freeze
diff --git a/app/models/journeys/further_education_payments/provider.rb b/app/models/journeys/further_education_payments/provider.rb
new file mode 100644
index 0000000000..d6d79b4c10
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider.rb
@@ -0,0 +1,32 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ extend Base
+ extend self
+
+ ROUTING_NAME = "further-education-payments-provider"
+ VIEW_PATH = "further_education_payments/provider"
+ I18N_NAMESPACE = "further_education_payments_provider"
+
+ POLICIES = []
+
+ FORMS = {
+ "claims" => {
+ "verify-claim" => VerifyClaimForm
+ }
+ }
+
+ CLAIM_VERIFIER_DFE_SIGN_IN_ROLE_CODE = "teacher_payments_claim_verifier"
+
+ START_WITH_MAGIC_LINK = true
+
+ def self.request_service_access_url(session)
+ [
+ "https://services.signin.education.gov.uk",
+ "request-service", DfeSignIn.configuration.client_id,
+ "users", session.answers.dfe_sign_in_uid
+ ].join("/")
+ end
+ end
+ end
+end
diff --git a/app/models/journeys/further_education_payments/provider/authorisation.rb b/app/models/journeys/further_education_payments/provider/authorisation.rb
new file mode 100644
index 0000000000..6d53442c8f
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider/authorisation.rb
@@ -0,0 +1,54 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class Authorisation
+ def initialize(answers:, slug:)
+ @answers = answers
+ @slug = slug
+ end
+
+ def failure_reason
+ return :organisation_mismatch if organisation_mismatch?
+ return :no_service_access unless answers.dfe_sign_in_service_access?
+ return :claim_admin if claim_admin?
+ return :incorrect_role unless role_permits_access?
+ return :already_verified if already_verified? && slug != "complete"
+
+ nil
+ end
+
+ private
+
+ attr_reader :answers, :slug
+
+ def organisation_mismatch?
+ answers.claim.school.ukprn != answers.dfe_sign_in_organisation_ukprn
+ end
+
+ def role_permits_access?
+ answers.dfe_sign_in_role_codes.include?(
+ CLAIM_VERIFIER_DFE_SIGN_IN_ROLE_CODE
+ )
+ end
+
+ def claim_admin?
+ claim_admin_roles.any? do |role_code|
+ answers.dfe_sign_in_role_codes.include?(role_code)
+ end
+ end
+
+ def claim_admin_roles
+ [
+ DfeSignIn::User::SERVICE_OPERATOR_DFE_SIGN_IN_ROLE_CODE,
+ DfeSignIn::User::SUPPORT_AGENT_DFE_SIGN_IN_ROLE_CODE,
+ DfeSignIn::User::PAYROLL_OPERATOR_DFE_SIGN_IN_ROLE_CODE
+ ]
+ end
+
+ def already_verified?
+ answers.claim.eligibility.verified?
+ end
+ end
+ end
+ end
+end
diff --git a/app/models/journeys/further_education_payments/provider/eligibility_checker.rb b/app/models/journeys/further_education_payments/provider/eligibility_checker.rb
new file mode 100644
index 0000000000..9b0ceb9dd1
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider/eligibility_checker.rb
@@ -0,0 +1,12 @@
+# Required to get page sequence to think this is a "normal" journey
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class EligibilityChecker < Journeys::EligibilityChecker
+ def ineligible?
+ false
+ end
+ end
+ end
+ end
+end
diff --git a/app/models/journeys/further_education_payments/provider/session.rb b/app/models/journeys/further_education_payments/provider/session.rb
new file mode 100644
index 0000000000..88ed584e20
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider/session.rb
@@ -0,0 +1,9 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class Session < Journeys::Session
+ attribute :answers, SessionAnswersType.new
+ end
+ end
+ end
+end
diff --git a/app/models/journeys/further_education_payments/provider/session_answers.rb b/app/models/journeys/further_education_payments/provider/session_answers.rb
new file mode 100644
index 0000000000..cdde91c7c1
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider/session_answers.rb
@@ -0,0 +1,26 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class SessionAnswers < Journeys::SessionAnswers
+ attribute :claim_id, :string
+ attribute :declaration, :boolean
+ attribute :dfe_sign_in_uid, :string
+ attribute :dfe_sign_in_organisation_id, :string
+ attribute :dfe_sign_in_organisation_ukprn, :string
+ attribute :dfe_sign_in_service_access, :boolean, default: false
+ attribute :dfe_sign_in_role_codes, default: []
+ attribute :dfe_sign_in_first_name, :string
+ attribute :dfe_sign_in_last_name, :string
+ attribute :dfe_sign_in_email, :string
+
+ def claim
+ @claim ||= Claim.includes(eligibility: :school).find(claim_id)
+ end
+
+ def dfe_sign_in_service_access?
+ !!dfe_sign_in_service_access
+ end
+ end
+ end
+ end
+end
diff --git a/app/models/journeys/further_education_payments/provider/session_answers_type.rb b/app/models/journeys/further_education_payments/provider/session_answers_type.rb
new file mode 100644
index 0000000000..6fe76c2889
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider/session_answers_type.rb
@@ -0,0 +1,7 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class SessionAnswersType < ::Journeys::SessionAnswersType; end
+ end
+ end
+end
diff --git a/app/models/journeys/further_education_payments/provider/slug_sequence.rb b/app/models/journeys/further_education_payments/provider/slug_sequence.rb
new file mode 100644
index 0000000000..a4c90fa449
--- /dev/null
+++ b/app/models/journeys/further_education_payments/provider/slug_sequence.rb
@@ -0,0 +1,54 @@
+module Journeys
+ module FurtherEducationPayments
+ module Provider
+ class SlugSequence
+ SLUGS = [
+ "sign-in",
+ "verify-claim",
+ "complete",
+ "unauthorised"
+ ]
+
+ RESTRICTED_SLUGS = [
+ "verify-claim",
+ "complete"
+ ]
+
+ def self.verify_claim_url(claim)
+ Rails.application.routes.url_helpers.new_claim_path(
+ module_parent::ROUTING_NAME,
+ answers: {
+ claim_id: claim.id
+ }
+ )
+ end
+
+ def self.start_page_url
+ Rails.application.routes.url_helpers.landing_page_path(
+ "further-education-payments-provider"
+ )
+ end
+
+ def initialize(journey_session)
+ @journey_session = journey_session
+ end
+
+ def slugs
+ SLUGS
+ end
+
+ def requires_authorisation?(slug)
+ RESTRICTED_SLUGS.include?(slug)
+ end
+
+ def unauthorised_path(slug, failure_reason)
+ Rails.application.routes.url_helpers.claim_path(
+ self.class.module_parent::ROUTING_NAME,
+ "unauthorised",
+ failure_reason: failure_reason
+ )
+ end
+ end
+ end
+ end
+end
diff --git a/app/models/journeys/page_sequence.rb b/app/models/journeys/page_sequence.rb
index e7633f9e5f..66f0f01e65 100644
--- a/app/models/journeys/page_sequence.rb
+++ b/app/models/journeys/page_sequence.rb
@@ -5,7 +5,7 @@ module Journeys
class PageSequence
attr_reader :current_slug
- DEAD_END_SLUGS = %w[complete existing-session eligible-later future-eligibility ineligible check-your-email]
+ DEAD_END_SLUGS = %w[complete existing-session eligible-later future-eligibility ineligible check-your-email unauthorised]
OPTIONAL_SLUGS = %w[postcode-search select-home-address reset-claim]
def initialize(slug_sequence, completed_slugs, current_slug, journey_session)
@@ -61,6 +61,14 @@ def next_required_slug
(slugs - completed_slugs - OPTIONAL_SLUGS).first
end
+ def requires_authorisation?(slug)
+ @slug_sequence.try(:requires_authorisation?, slug) || false
+ end
+
+ def unauthorised_path(slug, failure_reason)
+ @slug_sequence.unauthorised_path(slug, failure_reason)
+ end
+
private
delegate :answers, to: :@journey_session
diff --git a/app/models/policies/further_education_payments/eligibility.rb b/app/models/policies/further_education_payments/eligibility.rb
index d3aa06bf1f..233d9ce9c9 100644
--- a/app/models/policies/further_education_payments/eligibility.rb
+++ b/app/models/policies/further_education_payments/eligibility.rb
@@ -3,6 +3,21 @@ module FurtherEducationPayments
class Eligibility < ApplicationRecord
self.table_name = "further_education_payments_eligibilities"
+ class Course < Struct.new(:subject, :name, keyword_init: true)
+ include Journeys::FurtherEducationPayments::CoursesHelper
+
+ def taught?
+ name != "none"
+ end
+
+ def description
+ I18n.t(
+ "further_education_payments.forms.#{subject}_courses.options.#{name}",
+ link: link_for_course("#{subject}_courses", name)
+ )
+ end
+ end
+
has_one :claim, as: :eligibility, inverse_of: :eligibility
belongs_to :possible_school, optional: true, class_name: "School"
@@ -18,6 +33,26 @@ def policy
def ineligible?
false
end
+
+ def courses_taught
+ courses.select(&:taught?)
+ end
+
+ def courses
+ subjects_taught.map do |subject|
+ public_send(:"#{subject}_courses").map do |course|
+ Course.new(subject: subject, name: course)
+ end
+ end.flatten
+ end
+
+ def fixed_contract?
+ contract_type != "variable_hours"
+ end
+
+ def verified?
+ verification.present?
+ end
end
end
end
diff --git a/app/views/further_education_payments/provider/claims/_unauthorised_already_verified.html.erb b/app/views/further_education_payments/provider/claims/_unauthorised_already_verified.html.erb
new file mode 100644
index 0000000000..f0daa2eec6
--- /dev/null
+++ b/app/views/further_education_payments/provider/claims/_unauthorised_already_verified.html.erb
@@ -0,0 +1,21 @@
+
+ This claim has already been verified
+
+
+
+ Email <%= govuk_mail_to("FE-Levellingup.PremiumPayments@education.gov.uk") %>
+ if you need to:
+
+
+<%= govuk_list(
+ [
+ "view the verification form",
+ "make changes to the details provided in the verification form"
+ ],
+ type: :bullet
+) %>
+
+
+ Make sure you include the claim reference number in your email so we can find
+ the claim and process any changes promptly.
+
diff --git a/app/views/further_education_payments/provider/claims/_unauthorised_claim_admin.html.erb b/app/views/further_education_payments/provider/claims/_unauthorised_claim_admin.html.erb
new file mode 100644
index 0000000000..8308dce1c4
--- /dev/null
+++ b/app/views/further_education_payments/provider/claims/_unauthorised_claim_admin.html.erb
@@ -0,0 +1,22 @@
+
+ You do not have access to verify claims for this organisation
+
+
+
+ DfE staff do not have access to verify retention payments for further
+ education teachers.
+
+
+
+ If you need to view a claim:
+
+
+<%= govuk_list(
+ [
+ "Log in to DfE Sign-in using the ‘Manage Teacher Payments’ organisation.",
+ "Go to the ‘Search’ tab.",
+ "Search for the claim using the claim reference number."
+ ],
+ type: :number
+) %>
+
diff --git a/app/views/further_education_payments/provider/claims/_unauthorised_incorrect_role.html.erb b/app/views/further_education_payments/provider/claims/_unauthorised_incorrect_role.html.erb
new file mode 100644
index 0000000000..b81de7154f
--- /dev/null
+++ b/app/views/further_education_payments/provider/claims/_unauthorised_incorrect_role.html.erb
@@ -0,0 +1,15 @@
+
+ You do not have access to verify claims for this organisation
+
+
+
+ If you think you should have access, you need to:
+
+
+<%= govuk_list(
+ [
+ "check you have logged in to DfE Sign-in using the correct organisation",
+ "contact an approver at your organisation to confirm your access rights"
+ ],
+ type: :bullet
+) %>
diff --git a/app/views/further_education_payments/provider/claims/_unauthorised_no_service_access.html.erb b/app/views/further_education_payments/provider/claims/_unauthorised_no_service_access.html.erb
new file mode 100644
index 0000000000..28942b8179
--- /dev/null
+++ b/app/views/further_education_payments/provider/claims/_unauthorised_no_service_access.html.erb
@@ -0,0 +1,35 @@
+
+ You do not have access to this service
+
+
+
+ When a claimant applies for a retention payment, an access link will be
+ sent to your organisation's nominated email address.
+
+
+
+You can <%= govuk_link_to(
+ "request access",
+ Journeys::FurtherEducationPayments::Provider.request_service_access_url(journey_session)
+) %> to verify retention payments for further
+ education teachers using DfE Sign-in.
+
+
+
+ Your request will be sent to all approvers at your organisation. Most
+ requests will be approved or rejected within 5 days of being raised.
+
+
+
+ If you have waited 5 days or longer and you still haven't had a response
+ to your request:
+
+
+<%= govuk_list(
+ [
+ "Log in to DfE Sign-in and go to the 'Organisations' tab.",
+ "Find the email address of an approver at your organisation.",
+ "Send a chaser email."
+ ],
+ type: :bullet
+) %>
diff --git a/app/views/further_education_payments/provider/claims/_unauthorised_organisation_mismatch.html.erb b/app/views/further_education_payments/provider/claims/_unauthorised_organisation_mismatch.html.erb
new file mode 100644
index 0000000000..5779c1faa0
--- /dev/null
+++ b/app/views/further_education_payments/provider/claims/_unauthorised_organisation_mismatch.html.erb
@@ -0,0 +1,18 @@
+
+ You cannot verify this claim
+
+
+
+ The organisation you have used to log in to DfE Sign-in does not match
+ the organisation in the claim.
+
+
+
+ If your DfE Sign-in account is linked to multiple organisations, check
+ that you have logged in using the correct one.
+
+
+
+ Email <%= govuk_mail_to("FE-Levellingup.PremiumPayments@education.gov.uk") %>
+ if you have logged in with the correct organisation and need support.
+