From 89a467463b9ebbafaaf93b58374811fb5620e475 Mon Sep 17 00:00:00 2001 From: Ryan Kendall Date: Tue, 22 Aug 2023 15:49:55 +0100 Subject: [PATCH] feat(fworks): Addition of framework evaluator roles --- app/models/support/agent.rb | 1 + app/policies/cms_portal_policy.rb | 2 ++ spec/controllers/cms_entry_points_controller_spec.rb | 1 + 3 files changed, 4 insertions(+) diff --git a/app/models/support/agent.rb b/app/models/support/agent.rb index c4989384e..8794b6ff0 100644 --- a/app/models/support/agent.rb +++ b/app/models/support/agent.rb @@ -14,6 +14,7 @@ class Agent < ApplicationRecord e_and_o: "Engagement and Outreach Staff Member", internal: "Digital Team Staff Member", analyst: "Data Analyst", + framework_evaluator: "Framework Evaluator", }.freeze has_many :cases, class_name: "Support::Case" diff --git a/app/policies/cms_portal_policy.rb b/app/policies/cms_portal_policy.rb index 5b53d5291..21b86e032 100644 --- a/app/policies/cms_portal_policy.rb +++ b/app/policies/cms_portal_policy.rb @@ -11,6 +11,7 @@ def access_proc_ops_portal? = allow_any_of(%w[global_admin internal procops_admi def access_e_and_o_portal? = allow_any_of(%w[global_admin internal e_and_o_admin e_and_o]) def access_admin_settings? = allow_any_of(%w[global_admin procops_admin e_and_o_admin]) def access_establishment_search? = access_proc_ops_portal? || access_e_and_o_portal? + def access_frameworks_portal? = allow_any_of(%w[global_admin framework_evaluator]) # Agent management @@ -27,6 +28,7 @@ def grant_e_and_o_admin_role? = allow_any_of(%w[global_admin e_and_o_admin]) def grant_e_and_o_role? = allow_any_of(%w[global_admin e_and_o_admin]) def grant_internal_role? = allow_any_of(%w[global_admin]) def grant_analyst_role? = allow_any_of(%w[global_admin]) + def grant_framework_evaluator_role? = allow_any_of(%w[global_admin framework_evaluator]) private diff --git a/spec/controllers/cms_entry_points_controller_spec.rb b/spec/controllers/cms_entry_points_controller_spec.rb index 17e9ee08f..3d7a2161f 100644 --- a/spec/controllers/cms_entry_points_controller_spec.rb +++ b/spec/controllers/cms_entry_points_controller_spec.rb @@ -44,6 +44,7 @@ "e_and_o" => :engagement_root_path, "internal" => :support_root_path, "analyst" => :support_case_statistics_path, + "framework_evaluator" => :frameworks_root_path } home_paths.each do |role, home_path|