Cfg: Move ViewersCanEdit into cfg (#64876)

move ViewersCanEdit into cfg
This commit is contained in:
Jo
2023-03-16 10:54:01 +01:00
committed by GitHub
parent 7fd7c6ed78
commit 6b6cf5f4b7
21 changed files with 94 additions and 94 deletions
+2 -2
View File
@@ -102,7 +102,6 @@ var (
ExternalUserMngLinkUrl string
ExternalUserMngLinkName string
ExternalUserMngInfo string
ViewersCanEdit bool
// HTTP auth
SigV4AuthEnabled bool
@@ -330,6 +329,7 @@ type Cfg struct {
// DistributedCache
RemoteCacheOptions *RemoteCacheOptions
ViewersCanEdit bool
EditorsCanAdmin bool
ApiKeyMaxSecondsToLive int64
@@ -1567,7 +1567,7 @@ func readUserSettings(iniFile *ini.File, cfg *Cfg) error {
ExternalUserMngLinkName = valueAsString(users, "external_manage_link_name", "")
ExternalUserMngInfo = valueAsString(users, "external_manage_info", "")
ViewersCanEdit = users.Key("viewers_can_edit").MustBool(false)
cfg.ViewersCanEdit = users.Key("viewers_can_edit").MustBool(false)
cfg.EditorsCanAdmin = users.Key("editors_can_admin").MustBool(false)
userInviteMaxLifetimeVal := valueAsString(users, "user_invite_max_lifetime_duration", "24h")