mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-29 17:52:32 +00:00
* update mfa methods to use namespace_path instead of namespace_id * add test for empty namespace path and add namespace path to factories * add changelog entry * fix name * hide namespace label when path is empty and test updates
25 lines
619 B
JavaScript
25 lines
619 B
JavaScript
/**
|
|
* Copyright (c) HashiCorp, Inc.
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import { Factory } from 'miragejs';
|
|
|
|
export default Factory.extend({
|
|
api_hostname: 'api-foobar.duosecurity.com',
|
|
mount_accessor: '',
|
|
name: '', // returned but cannot be set at this time
|
|
namespace_path: '', // the root namespace returns an empty string for the path
|
|
pushinfo: '',
|
|
type: 'duo',
|
|
use_passcode: false,
|
|
username_template: '',
|
|
|
|
afterCreate(record) {
|
|
if (record.name) {
|
|
console.warn('Endpoint ignored these unrecognized parameters: [name]'); // eslint-disable-line
|
|
record.name = '';
|
|
}
|
|
},
|
|
});
|