def get_object(self, queryset=None): obj = super(CategoryView, self).get_object(queryset) if not perms.may_access_category(self.request, obj): raise PermissionDenied if not perms.may_view_category(self.request.user, obj): raise PermissionDenied return obj
def get_object(self, queryset=None): obj = super(CategoryView, self).get_object(queryset) if not perms.may_view_category(self.request.user, obj): raise PermissionDenied return obj