@punks/backend-entity-manager 0.0.345 → 0.0.347
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/dist/cjs/index.js +14 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +14 -13
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/esm/index.js
CHANGED
|
@@ -2966,6 +2966,7 @@ class TypeormCacheInstance {
|
|
|
2966
2966
|
where: {
|
|
2967
2967
|
instance: this.instanceName,
|
|
2968
2968
|
key,
|
|
2969
|
+
expirationTime: MoreThanOrEqual(new Date()),
|
|
2969
2970
|
},
|
|
2970
2971
|
});
|
|
2971
2972
|
if (item) {
|
|
@@ -4221,6 +4222,19 @@ let AuthGuard = AuthGuard_1 = class AuthGuard {
|
|
|
4221
4222
|
return false;
|
|
4222
4223
|
}
|
|
4223
4224
|
}
|
|
4225
|
+
const isForAllAuthenticated = this.getIsForAllAuthenticated(context);
|
|
4226
|
+
if (isForAllAuthenticated) {
|
|
4227
|
+
const isAuthenticated = !!auth?.user;
|
|
4228
|
+
this.logger.debug(`Authorized:${isAuthenticated} -> authentication guard`, {
|
|
4229
|
+
...this.getContextInfo({
|
|
4230
|
+
context,
|
|
4231
|
+
roles: auth?.roles,
|
|
4232
|
+
user: auth?.user,
|
|
4233
|
+
permissions: auth?.permissions,
|
|
4234
|
+
}),
|
|
4235
|
+
});
|
|
4236
|
+
return isAuthenticated;
|
|
4237
|
+
}
|
|
4224
4238
|
const allowedRoles = this.getAllowedRoles(context);
|
|
4225
4239
|
if (allowedRoles) {
|
|
4226
4240
|
const isAllowed = this.isRoleMatching(allowedRoles, auth?.roles ?? []);
|
|
@@ -4253,19 +4267,6 @@ let AuthGuard = AuthGuard_1 = class AuthGuard {
|
|
|
4253
4267
|
return false;
|
|
4254
4268
|
}
|
|
4255
4269
|
}
|
|
4256
|
-
const isForAllAuthenticated = this.getIsForAllAuthenticated(context);
|
|
4257
|
-
if (isForAllAuthenticated) {
|
|
4258
|
-
const isAuthenticated = !!auth?.user;
|
|
4259
|
-
this.logger.debug(`Authorized:${isAuthenticated} -> authentication guard`, {
|
|
4260
|
-
...this.getContextInfo({
|
|
4261
|
-
context,
|
|
4262
|
-
roles: auth?.roles,
|
|
4263
|
-
user: auth?.user,
|
|
4264
|
-
permissions: auth?.permissions,
|
|
4265
|
-
}),
|
|
4266
|
-
});
|
|
4267
|
-
return isAuthenticated;
|
|
4268
|
-
}
|
|
4269
4270
|
const isAuthenticated = !!auth?.user;
|
|
4270
4271
|
this.logger.debug(`Authorized:${isAuthenticated} -> auth guard`, {
|
|
4271
4272
|
...this.getContextInfo({
|