diff --git a/course/enrollment.py b/course/enrollment.py index b7e99e9299b313475bfb887759d0b8e27872ec4f..6cafff2efd8834ed442db60f54b95761dbce026e 100644 --- a/course/enrollment.py +++ b/course/enrollment.py @@ -786,7 +786,9 @@ class ParticipationQueryForm(StyledForm): @transaction.atomic @course_view def query_participations(pctx): - if not pctx.has_permission(pperm.query_participation): + if (not pctx.has_permission(pperm.query_participation) + or + pctx.has_permission(pperm.view_participant_masked_profile)): raise PermissionDenied(_("may not query participations")) request = pctx.request diff --git a/course/templates/course/course-base.html b/course/templates/course/course-base.html index beae3537a345592ce212a7a0ec0a2f9b9ba7c3a7..1c6e3ce972814a04b451d9babad41832426dc256 100644 --- a/course/templates/course/course-base.html +++ b/course/templates/course/course-base.html @@ -134,25 +134,27 @@ {% endif %} - {% if pperm.query_participations or pperm.manage_instant_flow_requests or pperm.preapprove_participation %} - {% endif %} {% endblock %}