fix: notify that the user is not an admin when trying to login with a non admin account in admin dashboard (#3651)
This commit is contained in:
committed by
GitHub
parent
5209c0a8ca
commit
c47e2e7767
@@ -131,7 +131,7 @@
|
|||||||
"send_magic_link": "Send magic link",
|
"send_magic_link": "Send magic link",
|
||||||
"sign_in_agreement": "By signing in, you are agreeing to our",
|
"sign_in_agreement": "By signing in, you are agreeing to our",
|
||||||
"sign_in_options": "All sign in option",
|
"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!!",
|
"team_name_long": "Team name should be atleast 6 characters long!!",
|
||||||
"user_not_found": "User not found in the infra!!"
|
"user_not_found": "User not found in the infra!!"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ declare module '@vue/runtime-core' {
|
|||||||
HoppSmartTable: typeof import('@hoppscotch/ui')['HoppSmartTable']
|
HoppSmartTable: typeof import('@hoppscotch/ui')['HoppSmartTable']
|
||||||
HoppSmartTabs: typeof import('@hoppscotch/ui')['HoppSmartTabs']
|
HoppSmartTabs: typeof import('@hoppscotch/ui')['HoppSmartTabs']
|
||||||
HoppSmartToggle: typeof import('@hoppscotch/ui')['HoppSmartToggle']
|
HoppSmartToggle: typeof import('@hoppscotch/ui')['HoppSmartToggle']
|
||||||
IconLucideArrowLeft: typeof import('~icons/lucide/arrow-left')['default']
|
|
||||||
IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
|
IconLucideChevronDown: typeof import('~icons/lucide/chevron-down')['default']
|
||||||
IconLucideInbox: typeof import('~icons/lucide/inbox')['default']
|
IconLucideInbox: typeof import('~icons/lucide/inbox')['default']
|
||||||
SettingsAuthProvider: typeof import('./components/settings/AuthProvider.vue')['default']
|
SettingsAuthProvider: typeof import('./components/settings/AuthProvider.vue')['default']
|
||||||
|
|||||||
@@ -184,6 +184,10 @@ const nonAdminUser = ref(false);
|
|||||||
const allowedAuthProviders = ref<string[]>([]);
|
const allowedAuthProviders = ref<string[]>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
|
const user = auth.getCurrentUser();
|
||||||
|
if (user && !user.isAdmin) {
|
||||||
|
nonAdminUser.value = true;
|
||||||
|
}
|
||||||
allowedAuthProviders.value = await getAllowedAuthProviders();
|
allowedAuthProviders.value = await getAllowedAuthProviders();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user