diff --git a/changelog/unreleased/enhancement-access-denied-page-change-message b/changelog/unreleased/enhancement-access-denied-page-change-message new file mode 100644 index 00000000000..ed7fda36c67 --- /dev/null +++ b/changelog/unreleased/enhancement-access-denied-page-change-message @@ -0,0 +1,6 @@ +Enhancement: Access denied page update message + +We've updated the access denied page message to be more specific and give the user a link to a help page. + +https://github.com/owncloud/web/pull/9263 +https://github.com/owncloud/web/issues/9051 diff --git a/packages/web-runtime/src/container/bootstrap.ts b/packages/web-runtime/src/container/bootstrap.ts index fffc60f5879..e5ca501e831 100644 --- a/packages/web-runtime/src/container/bootstrap.ts +++ b/packages/web-runtime/src/container/bootstrap.ts @@ -217,13 +217,13 @@ export const announceTheme = async ({ designSystem: any runtimeConfiguration?: RuntimeConfiguration }): Promise => { - const { theme } = await loadTheme(runtimeConfiguration?.theme) - await store.dispatch('loadThemes', { theme }) + const { web, common } = await loadTheme(runtimeConfiguration?.theme) + await store.dispatch('loadThemes', { theme: web, common }) const currentThemeName = useLocalStorage('oc_currentThemeName', null) // note: use null as default so that we can fall back to system preferences if (unref(currentThemeName) === null) { currentThemeName.value = useDefaultThemeName() } - await store.dispatch('loadTheme', { theme: theme[unref(currentThemeName)] || theme.default }) + await store.dispatch('loadTheme', { theme: web[unref(currentThemeName)] || web.default }) app.use(designSystem, { tokens: store.getters.theme.designTokens diff --git a/packages/web-runtime/src/helpers/theme.ts b/packages/web-runtime/src/helpers/theme.ts index 7ff062c2fb3..1595b98fd35 100644 --- a/packages/web-runtime/src/helpers/theme.ts +++ b/packages/web-runtime/src/helpers/theme.ts @@ -3,7 +3,7 @@ import defaultTheme from '../../themes/owncloud/theme.json' import { v4 as uuidV4 } from 'uuid' export const loadTheme = async (location = '') => { - const defaults = { theme: defaultTheme.web || defaultTheme } + const defaults = { web: defaultTheme.web || defaultTheme, common: defaultTheme.common || {} } if (location.split('.').pop() !== 'json') { if (isEqual(process.env.NODE_ENV, 'development')) { @@ -18,7 +18,7 @@ export const loadTheme = async (location = '') => { return defaults } const theme = await response.json() - return { theme: theme.web || theme } + return { web: theme.web || theme, common: theme.common || {} } } catch (e) { console.error( `Failed to load theme '${location}' is not a valid json file, using default theme.` diff --git a/packages/web-runtime/src/pages/accessDenied.vue b/packages/web-runtime/src/pages/accessDenied.vue index 00a843c7d38..d3c162999e5 100644 --- a/packages/web-runtime/src/pages/accessDenied.vue +++ b/packages/web-runtime/src/pages/accessDenied.vue @@ -5,6 +5,14 @@