edit permission
This commit is contained in:
parent
536874adcc
commit
86a5cd7fb5
1 changed files with 7 additions and 28 deletions
|
|
@ -183,7 +183,7 @@ class CheckAuth {
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
public async checkOrg(token: any,keycloakId: string) {
|
public async checkOrg(token: any, keycloakId: string) {
|
||||||
const redisClient = await this.redis.createClient({
|
const redisClient = await this.redis.createClient({
|
||||||
host: process.env.REDIS_HOST,
|
host: process.env.REDIS_HOST,
|
||||||
port: process.env.REDIS_PORT,
|
port: process.env.REDIS_PORT,
|
||||||
|
|
@ -193,35 +193,14 @@ class CheckAuth {
|
||||||
if (reply != null) {
|
if (reply != null) {
|
||||||
reply = JSON.parse(reply);
|
reply = JSON.parse(reply);
|
||||||
} else {
|
} else {
|
||||||
// await new CallAPI()
|
if (!keycloakId) throw "Error calling API No KeycloakId";
|
||||||
// .GetData(
|
|
||||||
// {
|
|
||||||
// headers: { authorization: token },
|
|
||||||
// }, `/org/permission/checkOrg/${keycloakId}`,false)
|
|
||||||
// .then((x) => {
|
|
||||||
// console.log("[In Then]");
|
|
||||||
// console.log("[res]",x);
|
|
||||||
// let data: any = {
|
|
||||||
// orgRootId: x.orgRootId,
|
|
||||||
// orgChild1Id: x.orgChild1Id,
|
|
||||||
// orgChild2Id: x.orgChild2Id,
|
|
||||||
// orgChild3Id: x.orgChild3Id,
|
|
||||||
// orgChild4Id: x.orgChild4Id,
|
|
||||||
// };
|
|
||||||
// console.log("[data]",data);
|
|
||||||
// return data;
|
|
||||||
// },
|
|
||||||
// )
|
|
||||||
// .catch((error) => {
|
|
||||||
// console.error("Error calling API:", error);
|
|
||||||
// });
|
|
||||||
try {
|
try {
|
||||||
const x = await new CallAPI().GetData(
|
const x = await new CallAPI().GetData(
|
||||||
{
|
{
|
||||||
headers: { authorization: token },
|
headers: { authorization: token },
|
||||||
},
|
},
|
||||||
`/org/permission/checkOrg/${keycloakId}`,
|
`/org/permission/checkOrg/${keycloakId}`,
|
||||||
false
|
false,
|
||||||
);
|
);
|
||||||
|
|
||||||
const data = {
|
const data = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue