From d408031304e364d3acee45709b630dc3656e2ed1 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 11 Mar 2019 09:48:36 +0100 Subject: [PATCH] fix OAuth Authorization View not requiring authentication --- passbook/oauth_provider/views/oauth2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/passbook/oauth_provider/views/oauth2.py b/passbook/oauth_provider/views/oauth2.py index 840991cc9..33b3c2b02 100644 --- a/passbook/oauth_provider/views/oauth2.py +++ b/passbook/oauth_provider/views/oauth2.py @@ -2,6 +2,7 @@ from logging import getLogger from urllib.parse import urlencode +from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import get_object_or_404, redirect, reverse from django.utils.translation import ugettext as _ from oauth2_provider.views.base import AuthorizationView @@ -15,7 +16,7 @@ from passbook.oauth_provider.models import OAuth2Provider LOGGER = getLogger(__name__) -class PassbookAuthorizationLoadingView(LoadingView): +class PassbookAuthorizationLoadingView(LoginRequiredMixin, LoadingView): """Show loading view for permission checks""" title = _('Checking permissions...')