mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 19:17:58 +00:00
Eslint prefer-const (#17864)
* adds prefer-const to eslint config and runs fixer * reverts unintended change
This commit is contained in:
@@ -58,8 +58,8 @@ export default Component.extend({
|
||||
// debounce
|
||||
yield timeout(Ember.testing ? 0 : WAIT_TIME);
|
||||
}
|
||||
let path = this.selectedAuthPath || this.selectedAuthType;
|
||||
let id = JSON.stringify([path, roleName]);
|
||||
const path = this.selectedAuthPath || this.selectedAuthType;
|
||||
const id = JSON.stringify([path, roleName]);
|
||||
let role = null;
|
||||
try {
|
||||
role = yield this.store.findRecord('role-jwt', id, { adapterOptions: { namespace: this.namespace } });
|
||||
@@ -137,7 +137,7 @@ export default Component.extend({
|
||||
// in the state param in the format `<state_id>,ns=<namespace>`. So if
|
||||
// `namespace` is empty, check for namespace in state as well.
|
||||
if (namespace === '' || this.featureFlagService.managedNamespaceRoot) {
|
||||
let i = state.indexOf(',ns=');
|
||||
const i = state.indexOf(',ns=');
|
||||
if (i >= 0) {
|
||||
// ",ns=" is 4 characters
|
||||
namespace = state.substring(i + 4);
|
||||
@@ -152,7 +152,7 @@ export default Component.extend({
|
||||
if (!path || !state || !code) {
|
||||
return this.handleOIDCError(ERROR_MISSING_PARAMS);
|
||||
}
|
||||
let adapter = this.store.adapterFor('auth-method');
|
||||
const adapter = this.store.adapterFor('auth-method');
|
||||
this.onNamespace(namespace);
|
||||
let resp;
|
||||
// do the OIDC exchange, set the token on the parent component
|
||||
@@ -190,13 +190,13 @@ export default Component.extend({
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
let win = this.getWindow();
|
||||
const win = this.getWindow();
|
||||
|
||||
const POPUP_WIDTH = 500;
|
||||
const POPUP_HEIGHT = 600;
|
||||
let left = win.screen.width / 2 - POPUP_WIDTH / 2;
|
||||
let top = win.screen.height / 2 - POPUP_HEIGHT / 2;
|
||||
let oidcWindow = win.open(
|
||||
const left = win.screen.width / 2 - POPUP_WIDTH / 2;
|
||||
const top = win.screen.height / 2 - POPUP_HEIGHT / 2;
|
||||
const oidcWindow = win.open(
|
||||
this.role.authUrl,
|
||||
'vaultOIDCWindow',
|
||||
`width=${POPUP_WIDTH},height=${POPUP_HEIGHT},resizable,scrollbars=yes,top=${top},left=${left}`
|
||||
|
||||
Reference in New Issue
Block a user