Files
vault/ui/mirage/factories/mfa-duo-method.js
lane-wetmore 4b05b590f5 UI: MFA methods now display namespace_path instead of namespace_id (#29588)
* 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
2025-02-13 21:16:34 +00:00

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 = '';
}
},
});