mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 11:38:02 +00:00
Eslint prefer-const (#17864)
* adds prefer-const to eslint config and runs fixer * reverts unintended change
This commit is contained in:
@@ -28,7 +28,7 @@ export default class DatabaseRoleEdit extends Component {
|
||||
@tracked loading = false;
|
||||
|
||||
get warningMessages() {
|
||||
let warnings = {};
|
||||
const warnings = {};
|
||||
if (this.args.model.canUpdateDb === false) {
|
||||
warnings.database = `You don’t have permissions to update this database connection, so this role cannot be created.`;
|
||||
}
|
||||
@@ -84,11 +84,11 @@ export default class DatabaseRoleEdit extends Component {
|
||||
this.loading = true;
|
||||
|
||||
const mode = this.args.mode;
|
||||
let roleSecret = this.args.model;
|
||||
let secretId = roleSecret.name;
|
||||
const roleSecret = this.args.model;
|
||||
const secretId = roleSecret.name;
|
||||
if (mode === 'create') {
|
||||
roleSecret.set('id', secretId);
|
||||
let path = roleSecret.type === 'static' ? 'static-roles' : 'roles';
|
||||
const path = roleSecret.type === 'static' ? 'static-roles' : 'roles';
|
||||
roleSecret.set('path', path);
|
||||
}
|
||||
roleSecret
|
||||
@@ -111,7 +111,7 @@ export default class DatabaseRoleEdit extends Component {
|
||||
@action
|
||||
rotateRoleCred(id) {
|
||||
const backend = this.args.model?.backend;
|
||||
let adapter = this.store.adapterFor('database/credential');
|
||||
const adapter = this.store.adapterFor('database/credential');
|
||||
adapter
|
||||
.rotateRoleCredentials(backend, id)
|
||||
.then(() => {
|
||||
|
||||
Reference in New Issue
Block a user