แก้สิทธิ์
This commit is contained in:
parent
28f8c87fea
commit
a6493dcb62
1 changed files with 2 additions and 13 deletions
|
|
@ -45,20 +45,9 @@ class CheckAuth {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return await new CallAPI()
|
return await new CallAPI()
|
||||||
.GetData(req, "/org/permission/org")
|
.GetData(req, `/org/permission/org/${action}/${system}`)
|
||||||
.then(async (x) => {
|
.then(async (x) => {
|
||||||
let privilege = null;
|
let privilege = x.privilege;
|
||||||
if (action.trim().toLocaleUpperCase() == "CREATE")
|
|
||||||
privilege = await this.PermissionCreate(req, system);
|
|
||||||
if (action.trim().toLocaleUpperCase() == "DELETE")
|
|
||||||
privilege = await this.PermissionDelete(req, system);
|
|
||||||
if (action.trim().toLocaleUpperCase() == "GET")
|
|
||||||
privilege = await this.PermissionGet(req, system);
|
|
||||||
if (action.trim().toLocaleUpperCase() == "LIST")
|
|
||||||
privilege = await this.PermissionList(req, system);
|
|
||||||
if (action.trim().toLocaleUpperCase() == "UPDATE")
|
|
||||||
privilege = await this.PermissionUpdate(req, system);
|
|
||||||
|
|
||||||
let data: any = {
|
let data: any = {
|
||||||
root: [null],
|
root: [null],
|
||||||
child1: [null],
|
child1: [null],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue