File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -77,8 +77,12 @@ class AuthorizationView(BaseAuthorizationView, FormView):
77
77
skip_authorization_completely = False
78
78
79
79
def get_initial (self ):
80
- # TODO: move this scopes conversion from and to string into a utils function
81
- scopes = self .oauth2_data .get ('scope' , self .oauth2_data .get ('scopes' , []))
80
+ if oauth2_settings .APP_SPECIFIC_SCOPES :
81
+ application = Application .objects .get (client_id = self .request .GET ['client_id' ])
82
+ scopes = application .allowed_scopes .split (' ' )
83
+ else :
84
+ # TODO: move this scopes conversion from and to string into a utils function
85
+ scopes = self .oauth2_data .get ('scope' , self .oauth2_data .get ('scopes' , []))
82
86
initial_data = {
83
87
'redirect_uri' : self .oauth2_data .get ('redirect_uri' , None ),
84
88
'scope' : ' ' .join (scopes ),
You can’t perform that action at this time.
0 commit comments