Merge pull request #1964 from ryanpetrello/fix-token-scope

fix a few minor issues that have broken the User Token creation
This commit is contained in:
Ryan Petrello 2018-05-29 15:10:17 -04:00 committed by GitHub
commit a3aad31be3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -1073,7 +1073,7 @@ class UserAuthorizedTokenSerializer(BaseOAuth2TokenSerializer):
validated_data['expires'] = now() + timedelta(
seconds=settings.OAUTH2_PROVIDER['ACCESS_TOKEN_EXPIRE_SECONDS']
)
obj = super(OAuth2TokenSerializer, self).create(validated_data)
obj = super(UserAuthorizedTokenSerializer, self).create(validated_data)
obj.save()
if obj.application is not None:
RefreshToken.objects.create(

View File

@ -42,11 +42,11 @@ function AddTokensController (
required: true,
_component: 'at-input-select',
_data: [
strings.get('add.SCOPE_PLACEHOLDER'),
strings.get('add.SCOPE_READ_LABEL'),
strings.get('add.SCOPE_WRITE_LABEL')
{ label: strings.get('add.SCOPE_PLACEHOLDER'), value: '' },
{ label: strings.get('add.SCOPE_READ_LABEL'), value: 'read' },
{ label: strings.get('add.SCOPE_WRITE_LABEL'), value: 'write' }
],
_exp: 'choice for (index, choice) in state._data',
_exp: 'choice.value as choice.label for (index, choice) in state._data',
_format: 'array'
};