This commit is contained in:
parent
156cfb0488
commit
701497a0b0
@ -96,7 +96,7 @@ import { computed } from "vue";
|
||||
import { useUserInfoStore } from '@s/useUserInfoStore';
|
||||
|
||||
const userStore = useUserInfoStore();
|
||||
const allowedUserId = 26; // 특정 ID (변경필요!!)
|
||||
const allowedUserId = 1; // 특정 ID (변경필요!!)
|
||||
|
||||
const userId = computed(() => userStore.user?.id ?? null);
|
||||
</script>
|
||||
|
||||
@ -120,7 +120,7 @@ router.beforeEach(async (to, from, next) => {
|
||||
return next({ name: 'Login', query: { redirect: to.fullPath } });
|
||||
}
|
||||
|
||||
// Authorization 페이지는 ID가 26이 아니면 접근 차단
|
||||
// Authorization 페이지는 ID가 1이 아니면 접근 차단
|
||||
if (to.path === "/authorization" && userId !== allowedUserId) {
|
||||
return next("/");
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user