@hostlink/nuxt-light 1.8.12 → 1.9.0

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "light",
3
3
  "configKey": "light",
4
- "version": "1.8.12"
4
+ "version": "1.9.0"
5
5
  }
@@ -1,5 +1,5 @@
1
1
  <script setup>
2
- import { useSlots, defineExpose } from 'vue'
2
+ import { useSlots } from 'vue'
3
3
 
4
4
  const model = defineModel();
5
5
  console.log(model);
@@ -145,10 +145,17 @@ const app = reactive({
145
145
  isGranted(right) {
146
146
  if (right === void 0)
147
147
  return true;
148
- if (app.isAdmin)
148
+ if (app.permissions.includes("*"))
149
149
  return true;
150
150
  if (app.permissions.includes(right))
151
151
  return true;
152
+ const parts = right.split(".");
153
+ parts.pop();
154
+ do {
155
+ if (app.permissions.includes(parts.join(".") + ".*"))
156
+ return true;
157
+ parts.pop();
158
+ } while (parts.length > 0);
152
159
  return false;
153
160
  },
154
161
  setPermissions(permissions) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hostlink/nuxt-light",
3
- "version": "1.8.12",
3
+ "version": "1.9.0",
4
4
  "description": "HostLink Nuxt Light Framework",
5
5
  "repository": "@hostlink/nuxt-light",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  "json-to-graphql-query": "^2.2.5",
46
46
  "quasar": "^2.15.2",
47
47
  "vue-i18n": "^9.2.2",
48
- "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.1/xlsx-0.20.1.tgz"
48
+ "xlsx": "https://cdn.sheetjs.com/xlsx-0.20.2/xlsx-0.20.2.tgz"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@nuxt/devtools": "latest",
@@ -58,4 +58,4 @@
58
58
  "nuxt": "^3.7.0",
59
59
  "vue-route-generator": "^1.0.0"
60
60
  }
61
- }
61
+ }