mirror of
https://github.com/ansible/awx.git
synced 2026-05-07 17:37:37 -02:30
Checks to make sure that OAUTH2_PROVIDER key is returned by api in settings options before attempting to use it. This fixes a bug where setting ACCESS_TOKEN_EXPIRE_SECONDS and AUTHORIZATION_CODE_EXPIRE_SECONDS manually in a file was causing the settings page to render improperly.
This commit is contained in:
@@ -34,14 +34,16 @@ export default ['GetBasePath', '$q', 'Rest', 'i18n',
|
|||||||
}
|
}
|
||||||
delete optsFromAPI[key].child;
|
delete optsFromAPI[key].child;
|
||||||
};
|
};
|
||||||
unnestOauth2ProviderKey('ACCESS_TOKEN_EXPIRE_SECONDS',
|
if (optsFromAPI.OAUTH2_PROVIDER) {
|
||||||
i18n._('The duration (in seconds) access tokens remain valid since their creation.'),
|
unnestOauth2ProviderKey('ACCESS_TOKEN_EXPIRE_SECONDS',
|
||||||
i18n._('Access Token Expiration'),
|
i18n._('The duration (in seconds) access tokens remain valid since their creation.'),
|
||||||
'OAUTH2_PROVIDER');
|
i18n._('Access Token Expiration'),
|
||||||
unnestOauth2ProviderKey('AUTHORIZATION_CODE_EXPIRE_SECONDS',
|
'OAUTH2_PROVIDER');
|
||||||
i18n._('The duration (in seconds) authorization codes remain valid since their creation.'),
|
unnestOauth2ProviderKey('AUTHORIZATION_CODE_EXPIRE_SECONDS',
|
||||||
i18n._('Authorization Code Expiration'),
|
i18n._('The duration (in seconds) authorization codes remain valid since their creation.'),
|
||||||
'OAUTH2_PROVIDER');
|
i18n._('Authorization Code Expiration'),
|
||||||
|
'OAUTH2_PROVIDER');
|
||||||
|
}
|
||||||
return optsFromAPI;
|
return optsFromAPI;
|
||||||
};
|
};
|
||||||
var getActions = appendOauth2ProviderKeys(data.actions.GET);
|
var getActions = appendOauth2ProviderKeys(data.actions.GET);
|
||||||
|
|||||||
Reference in New Issue
Block a user