Typo in Visibility + Add accepted values in Description (#4638)
This commit is contained in:
parent
fa372dc1ae
commit
a259c16c8b
|
@ -2092,7 +2092,7 @@ func (b *SystemBackend) handleTuneWriteCommon(ctx context.Context, path string,
|
||||||
|
|
||||||
if rawVal, ok := data.GetOk("listing_visibility"); ok {
|
if rawVal, ok := data.GetOk("listing_visibility"); ok {
|
||||||
lvString := rawVal.(string)
|
lvString := rawVal.(string)
|
||||||
listingVisibility := ListingVisiblityType(lvString)
|
listingVisibility := ListingVisibilityType(lvString)
|
||||||
|
|
||||||
if err := checkListingVisibility(listingVisibility); err != nil {
|
if err := checkListingVisibility(listingVisibility); err != nil {
|
||||||
return logical.ErrorResponse(fmt.Sprintf("invalid listing_visibility %s", listingVisibility)), nil
|
return logical.ErrorResponse(fmt.Sprintf("invalid listing_visibility %s", listingVisibility)), nil
|
||||||
|
@ -3744,7 +3744,7 @@ func sanitizeMountPath(path string) string {
|
||||||
return path
|
return path
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkListingVisibility(visibility ListingVisiblityType) error {
|
func checkListingVisibility(visibility ListingVisibilityType) error {
|
||||||
switch visibility {
|
switch visibility {
|
||||||
case ListingVisibilityHidden:
|
case ListingVisibilityHidden:
|
||||||
case ListingVisibilityUnauth:
|
case ListingVisibilityUnauth:
|
||||||
|
@ -4341,7 +4341,7 @@ This path responds to the following HTTP methods.
|
||||||
"This function can be used to generate high-entropy random bytes.",
|
"This function can be used to generate high-entropy random bytes.",
|
||||||
},
|
},
|
||||||
"listing_visibility": {
|
"listing_visibility": {
|
||||||
"Determines the visibility of the mount in the UI-specific listing endpoint.",
|
"Determines the visibility of the mount in the UI-specific listing endpoint. Accepted value are 'unauth' and ''.",
|
||||||
"",
|
"",
|
||||||
},
|
},
|
||||||
"passthrough_request_headers": {
|
"passthrough_request_headers": {
|
||||||
|
|
|
@ -41,14 +41,14 @@ const (
|
||||||
mountTableType = "mounts"
|
mountTableType = "mounts"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ListingVisiblityType represents the types for listing visilibity
|
// ListingVisibilityType represents the types for listing visibility
|
||||||
type ListingVisiblityType string
|
type ListingVisibilityType string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
// ListingVisibilityHidden is the hidden type for listing visibility
|
// ListingVisibilityHidden is the hidden type for listing visibility
|
||||||
ListingVisibilityHidden ListingVisiblityType = ""
|
ListingVisibilityHidden ListingVisibilityType = ""
|
||||||
// ListingVisibilityUnauth is the unauth type for listing visibility
|
// ListingVisibilityUnauth is the unauth type for listing visibility
|
||||||
ListingVisibilityUnauth ListingVisiblityType = "unauth"
|
ListingVisibilityUnauth ListingVisibilityType = "unauth"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -200,7 +200,7 @@ type MountConfig struct {
|
||||||
PluginName string `json:"plugin_name,omitempty" structs:"plugin_name,omitempty" mapstructure:"plugin_name"`
|
PluginName string `json:"plugin_name,omitempty" structs:"plugin_name,omitempty" mapstructure:"plugin_name"`
|
||||||
AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" structs:"audit_non_hmac_request_keys" mapstructure:"audit_non_hmac_request_keys"`
|
AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" structs:"audit_non_hmac_request_keys" mapstructure:"audit_non_hmac_request_keys"`
|
||||||
AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" structs:"audit_non_hmac_response_keys" mapstructure:"audit_non_hmac_response_keys"`
|
AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" structs:"audit_non_hmac_response_keys" mapstructure:"audit_non_hmac_response_keys"`
|
||||||
ListingVisibility ListingVisiblityType `json:"listing_visibility,omitempty" structs:"listing_visibility" mapstructure:"listing_visibility"`
|
ListingVisibility ListingVisibilityType `json:"listing_visibility,omitempty" structs:"listing_visibility" mapstructure:"listing_visibility"`
|
||||||
PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" structs:"passthrough_request_headers" mapstructure:"passthrough_request_headers"`
|
PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" structs:"passthrough_request_headers" mapstructure:"passthrough_request_headers"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ type APIMountConfig struct {
|
||||||
PluginName string `json:"plugin_name,omitempty" structs:"plugin_name,omitempty" mapstructure:"plugin_name"`
|
PluginName string `json:"plugin_name,omitempty" structs:"plugin_name,omitempty" mapstructure:"plugin_name"`
|
||||||
AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" structs:"audit_non_hmac_request_keys" mapstructure:"audit_non_hmac_request_keys"`
|
AuditNonHMACRequestKeys []string `json:"audit_non_hmac_request_keys,omitempty" structs:"audit_non_hmac_request_keys" mapstructure:"audit_non_hmac_request_keys"`
|
||||||
AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" structs:"audit_non_hmac_response_keys" mapstructure:"audit_non_hmac_response_keys"`
|
AuditNonHMACResponseKeys []string `json:"audit_non_hmac_response_keys,omitempty" structs:"audit_non_hmac_response_keys" mapstructure:"audit_non_hmac_response_keys"`
|
||||||
ListingVisibility ListingVisiblityType `json:"listing_visibility,omitempty" structs:"listing_visibility" mapstructure:"listing_visibility"`
|
ListingVisibility ListingVisibilityType `json:"listing_visibility,omitempty" structs:"listing_visibility" mapstructure:"listing_visibility"`
|
||||||
PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" structs:"passthrough_request_headers" mapstructure:"passthrough_request_headers"`
|
PassthroughRequestHeaders []string `json:"passthrough_request_headers,omitempty" structs:"passthrough_request_headers" mapstructure:"passthrough_request_headers"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue