Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix: notify that the user is not an admin when trying to login with a non admin account in admin dashboard (#3651)
Joel Jacob Stephenc47e2e77671d
diff --git a/packages/hoppscotch-sh-admin/locales/en.json b/packages/hoppscotch-sh-admin/locales/en.jsonindex e256c15d1..7a2d74f30 100644--- a/packages/hoppscotch-sh-admin/locales/en.json+++ b/packages/hoppscotch-sh-admin/locales/en.json@@ -131,7 +131,7 @@"send_magic_link": "Send magic link","sign_in_agreement": "By signing in, you are agreeing to our","sign_in_options": "All sign in option",- "sign_out": "sign out",+ "sign_out": "Sign out","team_name_long": "Team name should be atleast 6 characters long!!","user_not_found": "User not found in the infra!!"},diff --git a/packages/hoppscotch-sh-admin/src/components.d.ts b/packages/hoppscotch-sh-admin/src/components.d.tsindex 74372d52e..611eefbc8 100644--- a/packages/hoppscotch-sh-admin/src/components.d.ts+++ b/packages/hoppscotch-sh-admin/src/components.d.ts@@ -30,7 +30,6 @@ declare module '@vue/runtime-core' {HoppSmartTable: typeof import('@hoppscotch/ui')['HoppSmartTable']HoppSmartTabs: typeof import('@hoppscotch/ui')['HoppSmartTabs']HoppSmartToggle: typeof import('@hoppscotch/ui')['HoppSmartToggle']- IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']IconLucideInbox: typeof import('~icons/lucide/inbox')['default']SettingsAuthProvider: typeof import('./components/settings/AuthProvider.vue')['default']diff --git a/packages/hoppscotch-sh-admin/src/components/app/Login.vue b/packages/hoppscotch-sh-admin/src/components/app/Login.vueindex 37c15c516..4510aeed1 100644--- a/packages/hoppscotch-sh-admin/src/components/app/Login.vue+++ b/packages/hoppscotch-sh-admin/src/components/app/Login.vue@@ -184,6 +184,10 @@ const nonAdminUser = ref(false);const allowedAuthProviders = ref<string[]>([]);onMounted(async () => {+ const user = auth.getCurrentUser();+ if (user && !user.isAdmin) {+ nonAdminUser.value = true;+ }allowedAuthProviders.value = await getAllowedAuthProviders();});