mirror of
https://github.com/hashicorp/vault.git
synced 2026-05-05 20:36:26 +02:00
* license: update headers to IBM Corp. * `make proto` * update offset because source file changed Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
21 lines
495 B
JavaScript
21 lines
495 B
JavaScript
/**
|
|
* Copyright IBM Corp. 2016, 2025
|
|
* SPDX-License-Identifier: BUSL-1.1
|
|
*/
|
|
|
|
import Transform from '@ember-data/serializer/transform';
|
|
|
|
/**
|
|
* correctly maps boolean values to the two options for listingVisibility
|
|
* attribute on seceret engines and auth engines
|
|
*/
|
|
export default class MountVisibilityTransform extends Transform {
|
|
deserialize(serialized) {
|
|
return serialized === 'unauth';
|
|
}
|
|
|
|
serialize(deserialized) {
|
|
return deserialized === true ? 'unauth' : 'hidden';
|
|
}
|
|
}
|