Merge branch 'develop'
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 3s
All checks were successful
Spell Check / Spell Check with Typos (push) Successful in 3s
This commit is contained in:
commit
893eb4cca5
4 changed files with 7 additions and 2 deletions
|
|
@ -0,0 +1,2 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "RequestWorkStepStatus" ADD COLUMN "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP;
|
||||
|
|
@ -1612,6 +1612,7 @@ model RequestWork {
|
|||
model RequestWorkStepStatus {
|
||||
step Int
|
||||
workStatus RequestWorkStatus @default(Pending)
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
||||
requestWork RequestWork @relation(fields: [requestWorkId], references: [id], onDelete: Cascade)
|
||||
requestWorkId String
|
||||
|
|
|
|||
|
|
@ -623,7 +623,7 @@ export class CustomerBranchFileController extends Controller {
|
|||
},
|
||||
});
|
||||
if (!data) throw notFoundError("Customer Branch");
|
||||
await permissionCheck(user, data.customer.registeredBranch);
|
||||
await permissionCheckCompany(user, data.customer.registeredBranch);
|
||||
}
|
||||
|
||||
@Get("attachment")
|
||||
|
|
|
|||
|
|
@ -65,7 +65,9 @@ function globalAllow(user: RequestWithUser["user"]) {
|
|||
return user.roles?.some((v) => listAllowed.includes(v)) || false;
|
||||
}
|
||||
|
||||
const permissionCondCompany = createPermCondition((_) => true);
|
||||
const permissionCond = createPermCondition(globalAllow);
|
||||
const permissionCheckCompany = createPermCheck((_) => true);
|
||||
const permissionCheck = createPermCheck(globalAllow);
|
||||
|
||||
type EmployeeCreate = {
|
||||
|
|
@ -669,7 +671,7 @@ export class EmployeeFileController extends Controller {
|
|||
},
|
||||
});
|
||||
if (!data) throw notFoundError("Employee");
|
||||
await permissionCheck(user, data.customerBranch.customer.registeredBranch);
|
||||
await permissionCheckCompany(user, data.customerBranch.customer.registeredBranch);
|
||||
}
|
||||
|
||||
@Get("image")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue