From bc4254ad188ce6bae050118a19da378fd1fe9dac Mon Sep 17 00:00:00 2001 From: Leo Vasanko Date: Wed, 3 Dec 2025 19:46:36 -0600 Subject: [PATCH] Fix view switching of restricted app. --- frontend/src/components/RestrictedAuth.vue | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/RestrictedAuth.vue b/frontend/src/components/RestrictedAuth.vue index 21bdc16..9018f5c 100644 --- a/frontend/src/components/RestrictedAuth.vue +++ b/frontend/src/components/RestrictedAuth.vue @@ -29,8 +29,8 @@ - - + + @@ -70,8 +70,8 @@ const canAuthenticate = computed(() => { if (initializing.value) return false // In reauth mode, allow authentication even if already authenticated if (props.mode === 'reauth') return true - // In forbidden mode or forbidden view, don't allow authentication - if (props.mode === 'forbidden' || currentView.value === 'forbidden') return false + // In forbidden view (authenticated but lacking permissions), don't allow authentication + if (currentView.value === 'forbidden') return false // In login view or initial state, allow authentication return true }) @@ -80,7 +80,7 @@ const headingTitle = computed(() => { if (props.mode === 'reauth') { return `🔐 Additional Authentication` } - if (props.mode === 'forbidden' || currentView.value === 'forbidden') return '🚫 Forbidden' + if (currentView.value === 'forbidden') return '🚫 Forbidden' return `🔐 ${settings.value?.rp_name || location.origin}` }) @@ -88,7 +88,7 @@ const headerMessage = computed(() => { if (props.mode === 'reauth') { return 'Please verify your identity to continue with this action.' } - if (props.mode === 'forbidden' || currentView.value === 'forbidden') { + if (currentView.value === 'forbidden') { return 'You lack the required permissions.' } return 'Please sign in with your passkey.'