@cocreate/users 1.31.2 → 1.32.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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.32.0](https://github.com/CoCreate-app/CoCreate-users/compare/v1.31.3...v1.32.0) (2023-12-21)
2
+
3
+
4
+ ### Features
5
+
6
+ * support setting user roles ([eb7f0f0](https://github.com/CoCreate-app/CoCreate-users/commit/eb7f0f0096e556a124ed466da9f664d0108f180a))
7
+
8
+ ## [1.31.3](https://github.com/CoCreate-app/CoCreate-users/compare/v1.31.2...v1.31.3) (2023-12-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * set user_id as key_id ([7627677](https://github.com/CoCreate-app/CoCreate-users/commit/7627677b0260de7d26ba62d6ba7c8d2458d7123f))
14
+
1
15
  ## [1.31.2](https://github.com/CoCreate-app/CoCreate-users/compare/v1.31.1...v1.31.2) (2023-12-18)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/users",
3
- "version": "1.31.2",
3
+ "version": "1.32.0",
4
4
  "description": "A simple users component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "users",
package/src/client.js CHANGED
@@ -47,12 +47,13 @@ const CoCreateUser = {
47
47
  method: 'object.create',
48
48
  array: 'keys',
49
49
  object: {
50
+ _id: user.object[0]._id,
50
51
  type: "user",
51
52
  key: user.object[0]._id,
52
- roles: ['user'],
53
+ roles: user.object[0].roles,
53
54
  email: user.object[0].email,
54
55
  password: user.object[0].password || btoa('0000'),
55
- array: data.array
56
+ array: user.array
56
57
  }
57
58
  }
58
59