@riocrypto/common 1.0.464 → 1.0.466

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.
@@ -160,10 +160,16 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
160
160
  req.user = user;
161
161
  }
162
162
  }
163
- if ((!req.currentAdminAuth && !req.currentAuth && !req.user && !req.partner) ||
163
+ if (
164
+ // if no auth
165
+ (!req.currentAdminAuth && !req.currentAuth && !req.user && !req.partner) ||
164
166
  (!req.currentAuth &&
165
167
  !authorizationTypes.includes(authorization_type_1.AuthorizationType.Auth) &&
166
168
  !req.user)) {
169
+ if (req.currentAdminAuth &&
170
+ authorizationTypes.includes(authorization_type_1.AuthorizationType.Admin)) {
171
+ next();
172
+ }
167
173
  if (missingKYC) {
168
174
  throw new missing_kyc_approval_error_1.MissingKYCApprovalError();
169
175
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.464",
3
+ "version": "1.0.466",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",