nuxt-users 1.31.0 → 1.31.1

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/CHANGELOG.md CHANGED
@@ -1,6 +1,22 @@
1
1
  # Changelog
2
2
 
3
3
 
4
+ ## v1.31.1
5
+
6
+ [compare changes](https://github.com/rrd108/nuxt-users/compare/v1.31.0...v1.31.1)
7
+
8
+ ### 🩹 Fixes
9
+
10
+ - Includes scripts directory in the published package ([ceaa188](https://github.com/rrd108/nuxt-users/commit/ceaa188))
11
+
12
+ ### 🏡 Chore
13
+
14
+ - **release:** V1.31.0 ([21907d3](https://github.com/rrd108/nuxt-users/commit/21907d3))
15
+
16
+ ### ❤️ Contributors
17
+
18
+ - Rrd108 ([@rrd108](https://github.com/rrd108))
19
+
4
20
  ## v1.31.0
5
21
 
6
22
  [compare changes](https://github.com/rrd108/nuxt-users/compare/v1.30.0...v1.31.0)
package/dist/module.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-users",
3
3
  "configKey": "nuxtUsers",
4
- "version": "1.31.0",
4
+ "version": "1.31.1",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.0"
@@ -17,12 +17,15 @@ onMounted(async () => {
17
17
  authComposable.value = useAuthentication();
18
18
  });
19
19
  const canEdit = computed(() => {
20
+ console.log("canEdit", currentUser.value);
20
21
  if (!currentUser.value) return false;
21
22
  if (nuxtUsers.auth?.permissions) {
22
23
  const userPermissions = nuxtUsers.auth.permissions[currentUser.value.role] || [];
23
24
  const apiBasePath = nuxtUsers.apiBasePath;
25
+ console.log("userPermissions", userPermissions);
26
+ console.log("apiBasePath", apiBasePath);
24
27
  return userPermissions.some(
25
- (permission) => permission === "*" || permission === `${apiBasePath}/*` || permission === `${apiBasePath}/[id].delete`
28
+ (permission) => permission === "*" || permission === `${apiBasePath}/*` || permission === `${apiBasePath}/[id].put` || permission === `${apiBasePath}/[id].patch`
26
29
  );
27
30
  }
28
31
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-users",
3
- "version": "1.31.0",
3
+ "version": "1.31.1",
4
4
  "description": "A comprehensive user management module for Nuxt 3 and Nuxt 4 applications with authentication, authorization, database support, and CLI tools",
5
5
  "keywords": [
6
6
  "nuxt",