From b7e2f9e883a7bafb9ed3353fde72f4e6953cf3c9 Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 11 Jul 2023 14:52:23 +0200 Subject: [PATCH] Set TokenStorageLocal default to true (#6771) --- .../enhancement-add-open-links-with-default-app-env-variable | 0 .../unreleased/enhancement-add-token-storage-local-env-variable | 2 +- services/web/pkg/config/defaults/defaultconfig.go | 1 + services/web/pkg/config/options.go | 2 +- 4 files changed, 3 insertions(+), 2 deletions(-) rename changelog/{ => unreleased}/enhancement-add-open-links-with-default-app-env-variable (100%) diff --git a/changelog/enhancement-add-open-links-with-default-app-env-variable b/changelog/unreleased/enhancement-add-open-links-with-default-app-env-variable similarity index 100% rename from changelog/enhancement-add-open-links-with-default-app-env-variable rename to changelog/unreleased/enhancement-add-open-links-with-default-app-env-variable diff --git a/changelog/unreleased/enhancement-add-token-storage-local-env-variable b/changelog/unreleased/enhancement-add-token-storage-local-env-variable index a5bae30752..c95bd48655 100644 --- a/changelog/unreleased/enhancement-add-token-storage-local-env-variable +++ b/changelog/unreleased/enhancement-add-token-storage-local-env-variable @@ -4,4 +4,4 @@ We introduced the feature to store the access token in the local storage, this f but can be enabled by setting the env `WEB_OPTION_TOKEN_STORAGE_LOCAL` to `true`. https://github.com/owncloud/ocis/pull/6760 - +https://github.com/owncloud/ocis/pull/6771 diff --git a/services/web/pkg/config/defaults/defaultconfig.go b/services/web/pkg/config/defaults/defaultconfig.go index 110a12d8dd..75bca7de68 100644 --- a/services/web/pkg/config/defaults/defaultconfig.go +++ b/services/web/pkg/config/defaults/defaultconfig.go @@ -126,6 +126,7 @@ func DefaultConfig() *config.Config { }, Upload: &config.Upload{}, OpenLinksWithDefaultApp: true, + TokenStorageLocal: true, }, }, }, diff --git a/services/web/pkg/config/options.go b/services/web/pkg/config/options.go index c6ff21ddc5..efaeb1f149 100644 --- a/services/web/pkg/config/options.go +++ b/services/web/pkg/config/options.go @@ -23,7 +23,7 @@ type Options struct { ImprintURL string `json:"imprintUrl,omitempty" yaml:"imprintUrl" env:"WEB_OPTION_IMPRINT_URL" desc:"Specifies the target URL for the imprint link valid for the ocis instance in the account menu."` PrivacyURL string `json:"privacyUrl,omitempty" yaml:"privacyUrl" env:"WEB_OPTION_PRIVACY_URL" desc:"Specifies the target URL for the privacy link valid for the ocis instance in the account menu."` AccessDeniedHelpURL string `json:"accessDeniedHelpURL,omitempty" yaml:"accessDeniedHelpURL" env:"WEB_OPTION_ACCESS_DENIED_HELP_URL" desc:"Specifies the target URL valid for the ocis instance for the generic logged out / access denied page."` - TokenStorageLocal bool `json:"tokenStorageLocal,omitempty" yaml:"tokenStorageLocal" env:"WEB_OPTION_TOKEN_STORAGE_LOCAL" desc:"Specifies whether the access token will be stored in the local storage when set to 'true' or in the session storage when set to 'false''. If stored in the local storage, login state will be persisted across multiple browser tabs, means no additional logins are required. Defaults to 'false'."` + TokenStorageLocal bool `json:"tokenStorageLocal,omitempty" yaml:"tokenStorageLocal" env:"WEB_OPTION_TOKEN_STORAGE_LOCAL" desc:"Specifies whether the access token will be stored in the local storage when set to 'true' or in the session storage when set to 'false''. If stored in the local storage, login state will be persisted across multiple browser tabs, means no additional logins are required. Defaults to 'true'."` } // AccountEditLink are the AccountEditLink options