Skip to content

Commit

Permalink
feat: update permission mixin
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Jan 30, 2025
1 parent 09376f5 commit 98835e4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions course_discovery/apps/tagging/mixins.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
from django.conf import settings
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
from django.core.exceptions import PermissionDenied
from django.http import HttpResponse


class VerticalTaggingAdministratorPermissionRequiredMixin(LoginRequiredMixin, PermissionRequiredMixin):
class VerticalTaggingAdministratorPermissionRequiredMixin(
LoginRequiredMixin, PermissionRequiredMixin
):
"""
A mixin to enforce permission on VERTICALS_MANAGEMENT_GROUPS for class-based views.
"""

permission_required = [
'tagging.add_coursevertical', 'tagging.change_coursevertical', 'tagging.delete_coursevertical', 'tagging.view_coursevertical',
'tagging.view_vertical', 'tagging.view_subvertical'
"tagging.add_coursevertical", "tagging.change_coursevertical", "tagging.delete_coursevertical",
"tagging.view_coursevertical", "tagging.view_vertical", "tagging.view_subvertical",
]

0 comments on commit 98835e4

Please sign in to comment.