@riocrypto/common-server 1.0.2382 → 1.0.2383

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.
@@ -23,7 +23,7 @@ const requireMinRoleOrPermissions = (req, res, next, minRole, requiredPermission
23
23
  if (!auth) {
24
24
  throw new common_1.NotAuthorizedError();
25
25
  }
26
- if (auth.permissions) {
26
+ if (auth.permissions && auth.permissions.length > 0) {
27
27
  // Permission based requirements
28
28
  if (!auth.permissions.some((permission) => requiredPermissions.includes(permission))) {
29
29
  throw new common_1.GenericInputError(`Insufficient permissions. Contact your account owner to change your access permissions.`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2382",
3
+ "version": "1.0.2383",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",