corebasic 1.0.113 → 1.0.115

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/features.js CHANGED
@@ -19,7 +19,7 @@ async function loadLocalFeatures() { // For Local Testing
19
19
  let data = {}
20
20
  if (process.env.LOAD_LOCAL_FEATURES) {
21
21
  try {
22
- let url = 'https://slyp.app/slyp-main-dev/api/v1/features'
22
+ let url = 'https://slyp.app/slyp-dev/api/v1/features'
23
23
  let result = (await axios.get(url, { data: {}, headers: {jwt: SERVICE_ACCESS_TOKEN, service: true}, timeout: 1000 })).data
24
24
  await Utils.stringToFile('/slyp.local.features.json', JSON.stringify(result.data, null, '\t'))
25
25
  } catch {
@@ -85,6 +85,8 @@ export const checkRequest = async (req) => {
85
85
 
86
86
  const getRoles = async (company, user, req) => {
87
87
  let staff = (await Dip.query(req.meta, "staff", { user: user }))[0]
88
+ if (staff?._id === 'DEFAULT') // Company Creator Admin Access
89
+ return true
88
90
  let roles = (await Dip.query(req.meta, "privileges.staff", { _id: staff._id }))[0].items.map(item => item._id)
89
91
  return getAllowedFeatures(company, roles)
90
92
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "corebasic",
3
3
  "type": "module",
4
- "version": "1.0.113",
4
+ "version": "1.0.115",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {