Skip to content

Commit e2cbbfa

Browse files
fixup! feat: check authz permissions for course tagging
1 parent 2252cc5 commit e2cbbfa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • openedx/core/djangoapps/content_tagging/rest_api/v1

openedx/core/djangoapps/content_tagging/rest_api/v1/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ def ensure_has_view_object_tag_permission(self, user, taxonomy, object_id):
195195
user.username, COURSES_VIEW_COURSE.identifier, str(course_key)
196196
):
197197
raise PermissionDenied("You do not have permission to view object tags.")
198-
elif not should_use_authz:
198+
if not should_use_authz:
199199
# Fall back to parent implementation
200200
super().ensure_has_view_object_tag_permission(user, taxonomy, object_id)
201201

@@ -213,7 +213,7 @@ def ensure_user_has_can_tag_object_permissions(self, user, tags_data, object_id)
213213
user.username, COURSES_MANAGE_TAGS.identifier, str(course_key)
214214
):
215215
raise PermissionDenied("You do not have permission to manage object tags.")
216-
elif not should_use_authz:
216+
if not should_use_authz:
217217
# Fall back to parent implementation
218218
super().ensure_user_has_can_tag_object_permissions(user, tags_data, object_id)
219219

0 commit comments

Comments
 (0)