1
0
Fork 0
mirror of synced 2024-06-30 03:50:37 +12:00

Fixing minor mistake.

This commit is contained in:
mike12345567 2021-10-07 08:32:14 +01:00
parent 2a8d5814b1
commit be5f3a84ca

View file

@ -58,7 +58,7 @@ module.exports = async (ctx, next) => {
// If user and app tenant Ids do not match, 403
if (env.MULTI_TENANCY && ctx.user) {
const userTenantId = getTenantId()
const tenantId = getTenantIDFromAppID(ctx.appId) || DEFAULT_TENANT_ID
const tenantId = getTenantIDFromAppID(appId) || DEFAULT_TENANT_ID
if (tenantId !== userTenantId) {
ctx.throw(403, "Cannot access application.")
}