From 62d5ca0c7bd2c6314df8ff87960569f96844e835 Mon Sep 17 00:00:00 2001 From: Jan Ackermann Date: Mon, 18 Dec 2023 16:39:11 +0100 Subject: [PATCH] Enable preferences for unauth accounts --- ...nt-enable-user-preferences-in-public-links | 6 + packages/web-app-admin-settings/src/index.ts | 8 +- .../SideBar/Details/FileDetails.vue | 13 +- .../components/SideBar/Details/TagsSelect.vue | 8 +- packages/web-app-files/src/index.ts | 7 +- packages/web-app-ocm/src/index.ts | 10 +- packages/web-pkg/src/apps/types.ts | 2 +- .../src/components/Topbar/TopBar.vue | 40 +++-- .../src/components/Topbar/UserMenu.vue | 59 ++++--- packages/web-runtime/src/pages/account.vue | 113 ++++++++----- packages/web-runtime/src/router/index.ts | 2 +- .../__snapshots__/UserMenu.spec.ts.snap | 150 +++++++++++------- .../pages/__snapshots__/account.spec.ts.snap | 1 + .../features/smoke/languageChange.feature | 18 +++ tests/e2e/cucumber/steps/ui/accountMenu.ts | 13 +- tests/e2e/support/objects/account/actions.ts | 42 +++-- tests/e2e/support/objects/account/index.ts | 8 +- 17 files changed, 338 insertions(+), 162 deletions(-) create mode 100644 changelog/unreleased/enhancement-enable-user-preferences-in-public-links diff --git a/changelog/unreleased/enhancement-enable-user-preferences-in-public-links b/changelog/unreleased/enhancement-enable-user-preferences-in-public-links new file mode 100644 index 00000000000..5aafd1872c0 --- /dev/null +++ b/changelog/unreleased/enhancement-enable-user-preferences-in-public-links @@ -0,0 +1,6 @@ +Enhancement: Enable user preferences in public links + +We've enabled user preferences in public links, so any user even without an account can open +preferences in a public link context and for example change the current language. + +https://github.com/owncloud/web/pull/10207 diff --git a/packages/web-app-admin-settings/src/index.ts b/packages/web-app-admin-settings/src/index.ts index 0a95b623bf7..bfb10925607 100644 --- a/packages/web-app-admin-settings/src/index.ts +++ b/packages/web-app-admin-settings/src/index.ts @@ -20,7 +20,13 @@ const appInfo = { isFileEditor: false, applicationMenu: { enabled: (store: Store, ability: Ability) => { - return !!store.getters?.user?.id && ability.can('read-all', 'Setting') + return ( + !!store.getters?.user?.id && + (ability.can('read-all', 'Setting') || + ability.can('read-all', 'Account') || + ability.can('read-all', 'Group') || + ability.can('read-all', 'Drive')) + ) }, priority: 40 } diff --git a/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue b/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue index 5ecb7dd8025..bede70e4a8a 100644 --- a/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue +++ b/packages/web-app-files/src/components/SideBar/Details/FileDetails.vue @@ -122,11 +122,14 @@