|
5 | 5 | from django.shortcuts import get_object_or_404, redirect, render |
6 | 6 | from django.urls import reverse |
7 | 7 |
|
| 8 | +from manage_breast_screening.auth.models import Permission |
8 | 9 | from manage_breast_screening.mammograms.presenters import LastKnownMammogramPresenter |
9 | 10 | from manage_breast_screening.participants.services import fetch_current_provider |
10 | 11 |
|
@@ -32,7 +33,7 @@ def parse_return_url(request, default: str) -> str: |
32 | 33 | return return_url |
33 | 34 |
|
34 | 35 |
|
35 | | -@permission_required("participants.view_participant_data") |
| 36 | +@permission_required(Permission.VIEW_PARTICIPANT_DATA) |
36 | 37 | def show(request, pk): |
37 | 38 | participant = get_object_or_404(Participant, pk=pk) |
38 | 39 | presented_participant = ParticipantPresenter(participant) |
@@ -75,7 +76,7 @@ def show(request, pk): |
75 | 76 | ) |
76 | 77 |
|
77 | 78 |
|
78 | | -@permission_required("participants.view_participant_data") |
| 79 | +@permission_required(Permission.VIEW_PARTICIPANT_DATA) |
79 | 80 | def edit_ethnicity(request, pk): |
80 | 81 | participant = get_object_or_404(Participant, pk=pk) |
81 | 82 |
|
@@ -109,7 +110,7 @@ def edit_ethnicity(request, pk): |
109 | 110 | ) |
110 | 111 |
|
111 | 112 |
|
112 | | -@permission_required("participants.view_participant_data") |
| 113 | +@permission_required(Permission.VIEW_PARTICIPANT_DATA) |
113 | 114 | def add_previous_mammogram(request, pk): |
114 | 115 | participant = get_object_or_404(Participant, pk=pk) |
115 | 116 | current_provider = fetch_current_provider(pk) |
|
0 commit comments