* Remove guest badge

* Address feedback

* Fix lint, test and i18n

* Fix test
Этот коммит содержится в:
Daniel Espino García
2023-06-30 11:06:18 +02:00
коммит произвёл GitHub
родитель 05cd245e97
Коммит fda5dd8468
18 изменённых файлов: 66 добавлений и 22 удалений

Просмотреть файл

@@ -322,6 +322,7 @@ func GenerateLimitedClientConfig(c *model.Config, telemetryID string, license *m
props["EnableMultifactorAuthentication"] = strconv.FormatBool(*c.ServiceSettings.EnableMultifactorAuthentication)
props["EnforceMultifactorAuthentication"] = "false"
props["EnableGuestAccounts"] = strconv.FormatBool(*c.GuestAccountsSettings.Enable)
props["HideGuestTags"] = strconv.FormatBool(*c.GuestAccountsSettings.HideTags)
props["GuestAccountsEnforceMultifactorAuthentication"] = strconv.FormatBool(*c.GuestAccountsSettings.EnforceMultifactorAuthentication)
if license != nil {

Просмотреть файл

@@ -860,6 +860,7 @@ func (ts *TelemetryService) trackConfig() {
ts.SendTelemetry(TrackConfigGuestAccounts, map[string]any{
"enable": *cfg.GuestAccountsSettings.Enable,
"hide_tag": *cfg.GuestAccountsSettings.HideTags,
"allow_email_accounts": *cfg.GuestAccountsSettings.AllowEmailAccounts,
"enforce_multifactor_authentication": *cfg.GuestAccountsSettings.EnforceMultifactorAuthentication,
"isdefault_restrict_creation_to_domains": isDefault(*cfg.GuestAccountsSettings.RestrictCreationToDomains, ""),

Просмотреть файл

@@ -3055,6 +3055,7 @@ func (s *DisplaySettings) SetDefaults() {
type GuestAccountsSettings struct {
Enable *bool `access:"authentication_guest_access"`
HideTags *bool `access:"authentication_guest_access"`
AllowEmailAccounts *bool `access:"authentication_guest_access"`
EnforceMultifactorAuthentication *bool `access:"authentication_guest_access"`
RestrictCreationToDomains *string `access:"authentication_guest_access"`
@@ -3065,6 +3066,10 @@ func (s *GuestAccountsSettings) SetDefaults() {
s.Enable = NewBool(false)
}
if s.HideTags == nil {
s.HideTags = NewBool(false)
}
if s.AllowEmailAccounts == nil {
s.AllowEmailAccounts = NewBool(true)
}