@riocrypto/common 1.0.418 → 1.0.419
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.
|
@@ -124,11 +124,13 @@ const authorize = (req, res, next, mongoose, authorizationTypes) => __awaiter(vo
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
if ((!req.currentAdminAuth && !req.currentAuth && !req.user) ||
|
|
127
|
-
(req.currentAuth &&
|
|
127
|
+
(req.currentAuth &&
|
|
128
|
+
!authorizationTypes.includes(authorization_type_1.AuthorizationType.Auth) &&
|
|
129
|
+
!req.user)) {
|
|
128
130
|
if (missingKYC) {
|
|
129
131
|
throw new missing_kyc_approval_error_1.MissingKYCApprovalError();
|
|
130
132
|
}
|
|
131
|
-
if ((
|
|
133
|
+
if ((authorizationTypes.includes(authorization_type_1.AuthorizationType.User) ||
|
|
132
134
|
authorizationTypes.includes(authorization_type_1.AuthorizationType.UserNoKYC)) &&
|
|
133
135
|
((_g = req.cookies) === null || _g === void 0 ? void 0 : _g.jwt)) {
|
|
134
136
|
throw new missing_user_error_1.MissingUserError();
|