From d345db7dec2d675abc5d2096314c2b58dc6ddc2b Mon Sep 17 00:00:00 2001 From: Jan Date: Tue, 16 May 2023 16:52:54 +0200 Subject: [PATCH 1/2] Add config var OpenLinksWithDefaultApp --- ...enhancement-add-open-links-with-default-app-env-variable | 6 ++++++ services/web/pkg/config/defaults/defaultconfig.go | 3 ++- services/web/pkg/config/options.go | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 changelog/enhancement-add-open-links-with-default-app-env-variable diff --git a/changelog/enhancement-add-open-links-with-default-app-env-variable b/changelog/enhancement-add-open-links-with-default-app-env-variable new file mode 100644 index 00000000000..b8cb23859f2 --- /dev/null +++ b/changelog/enhancement-add-open-links-with-default-app-env-variable @@ -0,0 +1,6 @@ +Enhancement: add WEB_OPTION_OPEN_LINKS_WITH_DEFAULT_APP env variable + +We introduced the open file links with default app feature in web which is enabled by default, +this is now configurable and can be disabled by setting the env `WEB_OPTION_OPEN_LINKS_WITH_DEFAULT_APP` to `false`. + +https://github.com/owncloud/ocis/pull/6328 diff --git a/services/web/pkg/config/defaults/defaultconfig.go b/services/web/pkg/config/defaults/defaultconfig.go index 4138919939f..7bc2b51207c 100644 --- a/services/web/pkg/config/defaults/defaultconfig.go +++ b/services/web/pkg/config/defaults/defaultconfig.go @@ -79,7 +79,8 @@ func DefaultConfig() *config.Config { Sidebar: config.Sidebar{ Shares: config.SidebarShares{}, }, - Upload: &config.Upload{}, + Upload: &config.Upload{}, + OpenLinksWithDefaultApp: true, }, }, }, diff --git a/services/web/pkg/config/options.go b/services/web/pkg/config/options.go index 49d7c02c881..395650fd327 100644 --- a/services/web/pkg/config/options.go +++ b/services/web/pkg/config/options.go @@ -19,6 +19,7 @@ type Options struct { Editor *Editor `json:"editor,omitempty" yaml:"editor"` ContextHelpersReadMore bool `json:"contextHelpersReadMore,omitempty" yaml:"contextHelpersReadMore" env:"WEB_OPTION_CONTEXTHELPERS_READ_MORE" desc:"Specifies whether the 'Read more' link should be displayed or not."` LogoutURL string `json:"logoutUrl,omitempty" yaml:"logoutUrl" env:"WEB_OPTION_LOGOUT_URL" desc:"Adds a link to the user's profile page to point him to an external page, where he can manage his session and devices. This is helpful when an external IdP is used. This option is disabled by default."` + OpenLinksWithDefaultApp bool `json:"openLinksWithDefaultApp,omitempty" yaml:"openLinksWithDefaultApp" env:"WEB_OPTION_OPEN_LINKS_WITH_DEFAULT_APP" desc:"Specifies whether single file link shares should be opened with the default app or not. If not opened by the default app, the Web UI just displays the file details."` } // AccountEditLink are the AccountEditLink options From 20f068bc06634ca7e47085c59459e900170c324e Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 17 May 2023 14:35:01 +0200 Subject: [PATCH 2/2] Change description --- services/web/pkg/config/options.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/pkg/config/options.go b/services/web/pkg/config/options.go index 395650fd327..474f54b6e7c 100644 --- a/services/web/pkg/config/options.go +++ b/services/web/pkg/config/options.go @@ -19,7 +19,7 @@ type Options struct { Editor *Editor `json:"editor,omitempty" yaml:"editor"` ContextHelpersReadMore bool `json:"contextHelpersReadMore,omitempty" yaml:"contextHelpersReadMore" env:"WEB_OPTION_CONTEXTHELPERS_READ_MORE" desc:"Specifies whether the 'Read more' link should be displayed or not."` LogoutURL string `json:"logoutUrl,omitempty" yaml:"logoutUrl" env:"WEB_OPTION_LOGOUT_URL" desc:"Adds a link to the user's profile page to point him to an external page, where he can manage his session and devices. This is helpful when an external IdP is used. This option is disabled by default."` - OpenLinksWithDefaultApp bool `json:"openLinksWithDefaultApp,omitempty" yaml:"openLinksWithDefaultApp" env:"WEB_OPTION_OPEN_LINKS_WITH_DEFAULT_APP" desc:"Specifies whether single file link shares should be opened with the default app or not. If not opened by the default app, the Web UI just displays the file details."` + OpenLinksWithDefaultApp bool `json:"openLinksWithDefaultApp,omitempty" yaml:"openLinksWithDefaultApp" env:"WEB_OPTION_OPEN_LINKS_WITH_DEFAULT_APP" desc:"Specifies whether single file link shares should be opened with the default app or not. If not opened by the default app, the Web UI just displays the file details. Defaults to 'true'."` } // AccountEditLink are the AccountEditLink options