@cocreate/authorize 1.3.2 → 1.3.4

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.3.4](https://github.com/CoCreate-app/CoCreate-authorize/compare/v1.3.3...v1.3.4) (2023-06-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Update dependencies versions for [@cocreate](https://github.com/cocreate) libraries ([790409a](https://github.com/CoCreate-app/CoCreate-authorize/commit/790409ae104a47164cbd32353dd8e3c65f725b04))
7
+
8
+ ## [1.3.3](https://github.com/CoCreate-app/CoCreate-authorize/compare/v1.3.2...v1.3.3) (2023-06-11)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * renamed hosts to host. the value can be a string or an array of strings ([80a0cf6](https://github.com/CoCreate-app/CoCreate-authorize/commit/80a0cf6b8ade2e6e77af4ed774dae713a1d5c2a5))
14
+
1
15
  ## [1.3.2](https://github.com/CoCreate-app/CoCreate-authorize/compare/v1.3.1...v1.3.2) (2023-06-10)
2
16
 
3
17
 
@@ -10,7 +10,7 @@ module.exports = {
10
10
  "name": "index.html",
11
11
  "path": "/docs/authorize/index.html",
12
12
  "src": "{{./docs/index.html}}",
13
- "hosts": [
13
+ "host": [
14
14
  "*",
15
15
  "general.cocreate.app"
16
16
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/authorize",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "A simple authorize component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "authorize",
@@ -45,10 +45,10 @@
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "devDependencies": {
48
- "@cocreate/cli": "^1.29.3"
48
+ "@cocreate/cli": "^1.33.0"
49
49
  },
50
50
  "dependencies": {
51
- "@cocreate/crud-client": "^1.21.11",
52
- "@cocreate/utils": "^1.21.4"
51
+ "@cocreate/crud-client": "^1.21.13",
52
+ "@cocreate/utils": "^1.21.5"
53
53
  }
54
54
  }
package/src/index.js CHANGED
@@ -190,8 +190,8 @@
190
190
  return permission
191
191
  if (permission.organization_id !== organization_id)
192
192
  return false;
193
- if (permission.hosts && permission.hosts.length) {
194
- if (!permission.hosts || (!permission.hosts.includes(data.host) && !permission.hosts.includes("*")))
193
+ if (permission.host && permission.host.length) {
194
+ if (!permission.host || (!permission.host.includes(data.host) && !permission.host.includes("*")))
195
195
  return false;
196
196
 
197
197
  }