check workflow
This commit is contained in:
parent
4c2188a363
commit
32b0aa325d
74 changed files with 529 additions and 285 deletions
|
|
@ -54,16 +54,6 @@ class CheckAuth {
|
|||
.GetData(req, `/org/permission/org/${system}/${action}`)
|
||||
.then(async (x) => {
|
||||
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 = {
|
||||
root: [null],
|
||||
|
|
@ -149,16 +139,6 @@ class CheckAuth {
|
|||
.GetData(req, `/org/permission/user/${system}/${action}/${profileId}`)
|
||||
.then(async (x) => {
|
||||
let org = x.org;
|
||||
// if (action.trim().toLocaleUpperCase() == "CREATE")
|
||||
// org = await this.PermissionOrgCreate(req, system);
|
||||
// if (action.trim().toLocaleUpperCase() == "DELETE")
|
||||
// org = await this.PermissionOrgDelete(req, system);
|
||||
// if (action.trim().toLocaleUpperCase() == "GET")
|
||||
// org = await this.PermissionOrgGet(req, system);
|
||||
// if (action.trim().toLocaleUpperCase() == "LIST")
|
||||
// org = await this.PermissionOrgList(req, system);
|
||||
// if (action.trim().toLocaleUpperCase() == "UPDATE")
|
||||
// org = await this.PermissionOrgUpdate(req, system);
|
||||
|
||||
if (org.root != null) if (x.orgRootId != org.root[0]) throw "ไม่มีสิทธิ์เข้าถึงข้อมูล";
|
||||
if (org.child1 != null)
|
||||
|
|
@ -180,7 +160,7 @@ class CheckAuth {
|
|||
}
|
||||
});
|
||||
}
|
||||
public async Workflow(req: RequestWithUser, id: string) {
|
||||
public async Workflow(req: RequestWithUser, id: string, sysName: string) {
|
||||
if (
|
||||
req.headers.hasOwnProperty("api_key") &&
|
||||
req.headers["api_key"] &&
|
||||
|
|
@ -191,6 +171,7 @@ class CheckAuth {
|
|||
return await new CallAPI()
|
||||
.PostData(req, "/org/workflow/keycloak/isofficer", {
|
||||
refId: id,
|
||||
sysName: sysName,
|
||||
})
|
||||
.then((x) => {
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue