Anonymous: Enforce org role Viewer setting (#102070)

* Anon: Remove org role setting

* remove from ini

* remove setting from documentation
This commit is contained in:
Eric Leijonmarck
2025-03-27 09:10:30 +00:00
committed by GitHub
parent 9ca1d8bca7
commit e216c2f29d
8 changed files with 5 additions and 35 deletions
+1 -7
View File
@@ -3,7 +3,6 @@ package setting
type AnonymousSettings struct {
Enabled bool
OrgName string
OrgRole string
HideVersion bool
DeviceLimit int64
}
@@ -14,12 +13,7 @@ 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