msp: always ask for the DEL_AGC scope with the GET_AGC scope

This commit is contained in:
Benjamin Dauvergne 2014-01-08 11:36:23 +01:00
parent b19e633a42
commit 4501bd7373
1 changed files with 3 additions and 3 deletions

View File

@ -163,7 +163,7 @@ class PopupViewMixin(object):
return 'popup' in self.request.REQUEST
class LoginView(PopupViewMixin, MspOAuthSessionViewMixin, View):
scopes = [ 'GET_AGC' ]
scopes = [ 'GET_AGC', 'DELETE_AGC' ]
def dispatch(self, request, *args, **kwargs):
if request.user.is_authenticated():
@ -183,7 +183,7 @@ class LoginView(PopupViewMixin, MspOAuthSessionViewMixin, View):
login = LoginView.as_view()
class LinkView(PopupViewMixin, MspOAuthSessionViewMixin, View):
scopes = [ 'GET_AGC' ]
scopes = [ 'GET_AGC', 'DELETE_AGC' ]
def dispatch(self, request, *args, **kwargs):
'''Login user between authorization and access grant code request'''
@ -397,7 +397,7 @@ document = DocumentView.as_view()
class LoginOrLinkView(PopupViewMixin, MspOAuthSessionViewMixin, View):
scopes = [ 'GET_AGC' ]
scopes = [ 'GET_AGC', 'DELETE_AGC' ]
def get(self, request, *args, **kwargs):
'''Request an access grant code and associate it to the current user'''