Skip to content

Commit

Permalink
Merge pull request #1986 from DFE-Digital/feature/187438-service-supp…
Browse files Browse the repository at this point in the history
…ort-can-see-handover

Give Service Support users access to see projects from Prepare
  • Loading branch information
lozette authored Nov 8, 2024
2 parents 27729e9 + 0133e00 commit f423b99
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased][unreleased]

### Added

- Service support users can see the "Handover" tab & view projects handed over
from Prepare

## [Release-94][release-94]

### Added
Expand Down
2 changes: 1 addition & 1 deletion app/policies/project_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def index?
end

def handover?
@user.is_regional_delivery_officer?
@user.is_regional_delivery_officer? || @user.is_service_support?
end

def show?
Expand Down
7 changes: 5 additions & 2 deletions spec/policies/project_policy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,12 @@
expect(subject).to permit(build(:regional_delivery_officer_user))
end

it "denies access if the user is not a regional delivery officer" do
it "grants access if the user is a service support user" do
expect(subject).to permit(build(:regional_delivery_officer_user))
end

it "denies access if the user is not a regional delivery officer or service support user" do
expect(subject).not_to permit(build(:regional_casework_services_user))
expect(subject).not_to permit(build(:service_support_user))
expect(subject).not_to permit(build(:inactive_user))
end
end
Expand Down

0 comments on commit f423b99

Please sign in to comment.