@konplit-services/common 1.0.81 → 1.0.82
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.
|
@@ -27,7 +27,7 @@ const hasPermission = (permissionCode) => {
|
|
|
27
27
|
let permissions = [];
|
|
28
28
|
const perm = yield base_1.redisWrapper.get((0, constants_1.getPermissions)(user.id));
|
|
29
29
|
if (!perm) {
|
|
30
|
-
throw new
|
|
30
|
+
throw new forbidden_error_1.ForbiddenError(language_1.lang.forbidden, error_codes_1.error_codes.INVALID_FORBIDDEN);
|
|
31
31
|
}
|
|
32
32
|
permissions = JSON.parse(perm);
|
|
33
33
|
if (!permissions.includes(permissionCode)) {
|