Anon: Deprecation notice for Editor, Admin anonymous org role usage (#101411)

* deprecation notice for anonymous org role usage

* exclude viewer
pull/100502/head
Eric Leijonmarck 3 months ago committed by GitHub
parent 908f4ff357
commit 843d876f16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 5
      pkg/setting/setting_anonymous.go

@ -14,7 +14,12 @@ func (cfg *Cfg) readAnonymousSettings() {
anonSettings := AnonymousSettings{}
anonSettings.Enabled = anonSection.Key("enabled").MustBool(false)
anonSettings.OrgName = valueAsString(anonSection, "org_name", "")
// Deprecated:
// only viewer role is supported
anonSettings.OrgRole = valueAsString(anonSection, "org_role", "")
if anonSettings.OrgRole != "Viewer" {
cfg.Logger.Warn("auth.anonymous.org_role is deprecated, only viewer role is supported")
}
anonSettings.HideVersion = anonSection.Key("hide_version").MustBool(false)
anonSettings.DeviceLimit = anonSection.Key("device_limit").MustInt64(0)
cfg.Anonymous = anonSettings

Loading…
Cancel
Save