mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
fix a few minor issues that have broken the User Token creation
see: https://github.com/ansible/tower/issues/1928
This commit is contained in:
parent
0fca495792
commit
af7ec17ccd
@ -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(
|
||||
|
||||
@ -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'
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user