Browse Source

fix: only check token_expired in non-public base

pull/2338/head
Wing-Kam Wong 2 years ago
parent
commit
3704b63b9d
  1. 4
      packages/nocodb/src/lib/meta/helpers/ncMetaAclMw.ts

4
packages/nocodb/src/lib/meta/helpers/ncMetaAclMw.ts

@ -25,7 +25,8 @@ export default function(handlerFn, permissionName) {
NcError.unauthorized('Unauthorized access');
}
// check if the token is still valid
// check if the token is still valid for non-public base
if (!req?.session?.passport?.user?.isPublicBase) {
const email = req?.session?.passport?.user?.email;
let user =
email &&
@ -41,6 +42,7 @@ export default function(handlerFn, permissionName) {
if (user.token_expired) {
NcError.unauthorized('Token Expired. Please login again.');
}
}
next();
}),
// @ts-ignore

Loading…
Cancel
Save