fix: do not omit empty portal_customized_bg_image_filename and portal_customized_logo_filename (#59)

This commit is contained in:
Mateusz Filipowicz
2025-03-21 16:58:24 +01:00
committed by GitHub
parent 4e41cd466d
commit bfa3bba50d
2 changed files with 6 additions and 2 deletions

View File

@@ -493,6 +493,10 @@ customizations:
fields: fields:
AllowedSubnet: AllowedSubnet:
jsonPath: "allowed_subnet" jsonPath: "allowed_subnet"
PortalCustomizedBgImageFilename:
omitEmpty: false
PortalCustomizedLogoFilename:
omitEmpty: false
RestrictedSubnet: RestrictedSubnet:
jsonPath: "restricted_subnet" jsonPath: "restricted_subnet"
GoogleDomain: GoogleDomain:

View File

@@ -58,7 +58,7 @@ type SettingGuestAccess struct {
PortalCustomizedAuthenticationText string `json:"portal_customized_authentication_text,omitempty"` PortalCustomizedAuthenticationText string `json:"portal_customized_authentication_text,omitempty"`
PortalCustomizedBgColor string `json:"portal_customized_bg_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$ PortalCustomizedBgColor string `json:"portal_customized_bg_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
PortalCustomizedBgImageEnabled bool `json:"portal_customized_bg_image_enabled"` PortalCustomizedBgImageEnabled bool `json:"portal_customized_bg_image_enabled"`
PortalCustomizedBgImageFilename string `json:"portal_customized_bg_image_filename,omitempty"` PortalCustomizedBgImageFilename string `json:"portal_customized_bg_image_filename"`
PortalCustomizedBgImageTile bool `json:"portal_customized_bg_image_tile"` PortalCustomizedBgImageTile bool `json:"portal_customized_bg_image_tile"`
PortalCustomizedBgType string `json:"portal_customized_bg_type,omitempty" validate:"omitempty,oneof=color image gallery"` // color|image|gallery PortalCustomizedBgType string `json:"portal_customized_bg_type,omitempty" validate:"omitempty,oneof=color image gallery"` // color|image|gallery
PortalCustomizedBoxColor string `json:"portal_customized_box_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$ PortalCustomizedBoxColor string `json:"portal_customized_box_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
@@ -72,7 +72,7 @@ type SettingGuestAccess struct {
PortalCustomizedLanguages []string `json:"portal_customized_languages,omitempty"` // ^[a-z]{2}([_-][a-zA-Z]{2,4})*$ PortalCustomizedLanguages []string `json:"portal_customized_languages,omitempty"` // ^[a-z]{2}([_-][a-zA-Z]{2,4})*$
PortalCustomizedLinkColor string `json:"portal_customized_link_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$ PortalCustomizedLinkColor string `json:"portal_customized_link_color"` // ^#[a-zA-Z0-9]{6}$|^#[a-zA-Z0-9]{3}$|^$
PortalCustomizedLogoEnabled bool `json:"portal_customized_logo_enabled"` PortalCustomizedLogoEnabled bool `json:"portal_customized_logo_enabled"`
PortalCustomizedLogoFilename string `json:"portal_customized_logo_filename,omitempty"` PortalCustomizedLogoFilename string `json:"portal_customized_logo_filename"`
PortalCustomizedLogoPosition string `json:"portal_customized_logo_position,omitempty" validate:"omitempty,oneof=left center right"` // left|center|right PortalCustomizedLogoPosition string `json:"portal_customized_logo_position,omitempty" validate:"omitempty,oneof=left center right"` // left|center|right
PortalCustomizedLogoSize int `json:"portal_customized_logo_size,omitempty"` // 6[4-9]|[7-9][0-9]|1[0-8][0-9]|19[0-2] PortalCustomizedLogoSize int `json:"portal_customized_logo_size,omitempty"` // 6[4-9]|[7-9][0-9]|1[0-8][0-9]|19[0-2]
PortalCustomizedSuccessText string `json:"portal_customized_success_text,omitempty"` PortalCustomizedSuccessText string `json:"portal_customized_success_text,omitempty"`