From ced3a15d00e01cce5eaa900c05f392c16104f3c0 Mon Sep 17 00:00:00 2001 From: garrettmills Date: Tue, 4 May 2021 09:27:33 -0500 Subject: [PATCH] Remove vault menu item --- app/assets/app/dash/SideBar.component.js | 6 ----- app/models/vault/Entry.model.js | 29 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 6 deletions(-) create mode 100644 app/models/vault/Entry.model.js diff --git a/app/assets/app/dash/SideBar.component.js b/app/assets/app/dash/SideBar.component.js index d239678..984232f 100644 --- a/app/assets/app/dash/SideBar.component.js +++ b/app/assets/app/dash/SideBar.component.js @@ -66,12 +66,6 @@ export default class SideBarComponent extends Component { type: 'resource', resource: 'iam/Permission', }, - { - text: 'Vaults', - action: 'list', - type: 'resource', - resource: 'vault/Vault', - }, { text: 'Computers', action: 'list', diff --git a/app/models/vault/Entry.model.js b/app/models/vault/Entry.model.js new file mode 100644 index 0000000..d089c34 --- /dev/null +++ b/app/models/vault/Entry.model.js @@ -0,0 +1,29 @@ +const { Model } = require('flitter-orm') + +class EntryModel extends Model { + static get services() { + return [...super.services, 'models'] + } + + static get schema() { + return { + active: { type: Boolean, default: true }, + vault_id: String, + key: String, + locked_value: String, + } + } + + async to_api() { + return { + id: this.id, + _id: this.id, + vault_id: this.vault_id, + key: this.key, + locked_value: this.locked_value, + active: this.active, + } + } +} + +module.exports = exports = EntryModel