corebasic 1.0.253 → 1.0.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/libs/session.ts +1 -1
- package/package.json +1 -1
package/libs/session.ts
CHANGED
|
@@ -45,7 +45,7 @@ export const start = (expressApp: ExpressApp, allowedUrls: string[]) => {
|
|
|
45
45
|
const checkPrivilege = async (req: Req) => {
|
|
46
46
|
const staff = Utils.isEmpty(req.body.staff) ? 'BLANK_STAFF' : req.body.staff
|
|
47
47
|
type PrivilegeResponse = {data: {granted: boolean}}
|
|
48
|
-
const response = (await Features.send({company: req.body.company, outlet: req.body.outlet, app: req.body.app}, "privileges.query.check" as keyof FeatureTypes, {feature: req.body.feature } as any as never, {id: staff} as Features.FeatureParams)) as PrivilegeResponse
|
|
48
|
+
const response = (await Features.send({company: req.body.company, outlet: req.body.outlet, app: req.body.app}, "privileges.query.check" as keyof FeatureTypes, {feature: req.body.feature } as any as never, {id: staff} as Features.FeatureParams)) as unknown as PrivilegeResponse
|
|
49
49
|
const granted = response.data.granted
|
|
50
50
|
if (!granted)
|
|
51
51
|
throw {message: "Access Denied"}
|