Skip to content

Commit

Permalink
fix: add permission check
Browse files Browse the repository at this point in the history
  • Loading branch information
rpenido committed Oct 12, 2023
1 parent 04233cb commit effe672
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions openedx_tagging/core/tagging/rest_api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ def export(self, request, **_kwargs) -> HttpResponse:
Export a taxonomy.
"""
taxonomy = self.get_object()
perm = "oel_tagging.export_taxonomy"
if not request.user.has_perm(perm, taxonomy):
raise PermissionDenied("You do not have permission to export this taxonomy.")
query_params = TaxonomyExportQueryParamsSerializer(
data=request.query_params.dict()
)
Expand Down

0 comments on commit effe672

Please sign in to comment.