remove keycloak use cookie auth
This commit is contained in:
parent
035db71697
commit
5a5e37c12d
27 changed files with 501 additions and 440 deletions
|
|
@ -3,8 +3,8 @@ import { onMounted, ref } from "vue";
|
|||
import { defineAsyncComponent } from "@vue/runtime-core";
|
||||
import { useRouter, useRoute } from "vue-router";
|
||||
import cardTop from "@/modules/05_placement/components/PersonalList/StatCard.vue";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
|
||||
|
|
@ -81,8 +81,9 @@ onMounted(async () => {
|
|||
await fetchPlacementData();
|
||||
}
|
||||
|
||||
if (keycloak.tokenParsed != null) {
|
||||
roleAdmin.value = await keycloak.tokenParsed.role.includes("placement1");
|
||||
const user = await tokenParsed();
|
||||
if (user) {
|
||||
roleAdmin.value = await user.role.includes("placement1");
|
||||
}
|
||||
|
||||
await getStat();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue