corebasic 1.0.158 → 1.0.160

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.
Files changed (2) hide show
  1. package/libs/session.js +2 -1
  2. package/package.json +1 -1
package/libs/session.js CHANGED
@@ -28,7 +28,8 @@ export const start = (expressApp, allowedUrls) => {
28
28
  return next()
29
29
 
30
30
  const checkPrivilege = async req => {
31
- const granted = (await Features.send({company: req.body.company, outlet: req.body.outlet}, "privileges.query.check", {feature: req.body.feature }, {id: req.body.staff})).data.granted
31
+ const staff = Utils.isEmpty(req.body.staff) ? 'BLANK_STAFF' : req.body.staff
32
+ const granted = (await Features.send({company: req.body.company, outlet: req.body.outlet, app: req.body.app}, "privileges.query.check", {feature: req.body.feature }, {id: staff})).data.granted
32
33
  if (!granted)
33
34
  throw {message: "Access Denied"}
34
35
  return granted
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.158",
4
+ "version": "1.0.160",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {