Skip to content

Commit 3dbacde

Browse files
committed
Update VaccinationRecordPolicy for manual_record scope
Only the `service` scope was permitted to edit vaccination records. This stopped the final step in the already vaccinated wizard rendering. Jira-Issue: MAV-3404
1 parent 632167a commit 3dbacde

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

app/controllers/draft_vaccination_records_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def update
6363

6464
reload_steps
6565

66-
require 'pry'; binding.pry
6766
render_wizard @draft_vaccination_record
6867
end
6968

app/policies/vaccination_record_policy.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def update?
2727
(
2828
record.performed_by_user_id == user.id || user.is_nurse? ||
2929
user.is_prescriber?
30-
) && record.sourced_from_service? &&
30+
) && (record.sourced_from_service? || record.sourced_from_manual_report?) &&
3131
record.performed_ods_code == user.selected_organisation.ods_code
3232
elsif team.has_national_reporting_access?
3333
record.sourced_from_national_reporting? &&

0 commit comments

Comments
 (0)