mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-16 11:37:04 +02:00
16 lines
415 B
JavaScript
16 lines
415 B
JavaScript
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';
|
|
}
|
|
}
|