remove keycloak use cookie auth
This commit is contained in:
parent
035db71697
commit
5a5e37c12d
27 changed files with 501 additions and 440 deletions
|
|
@ -9,8 +9,8 @@ import { useRetirementDataStore } from "@/modules/06_retirement/store";
|
|||
import http from "@/plugins/http";
|
||||
import config from "@/app.config";
|
||||
import axios from "axios";
|
||||
import { tokenParsed } from "@/plugins/auth";
|
||||
|
||||
import keycloak from "@/plugins/keycloak";
|
||||
import type {
|
||||
TypeFile,
|
||||
rowFile,
|
||||
|
|
@ -144,10 +144,11 @@ const checkboxOp = ref<CheckBoxType[]>([
|
|||
onMounted(async () => {
|
||||
fetchData(id.value);
|
||||
fetchFile();
|
||||
if (keycloak.tokenParsed !== undefined) {
|
||||
const commander = await keycloak.tokenParsed.role.includes("commander");
|
||||
const oligarch = await keycloak.tokenParsed.role.includes("oligarch");
|
||||
const officer = await keycloak.tokenParsed.role.includes("officer");
|
||||
const user = await tokenParsed();
|
||||
if (user) {
|
||||
const commander = await user.role.includes("commander");
|
||||
const oligarch = await kuser.role.includes("oligarch");
|
||||
const officer = await user.role.includes("officer");
|
||||
if (commander) {
|
||||
roleUser.value = "commander";
|
||||
} else if (oligarch) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue