From 06c601ec30e3eba3dbb5684f7ffd07e4011cd781 Mon Sep 17 00:00:00 2001 From: Sujith Date: Fri, 3 Feb 2023 18:11:39 +0530 Subject: [PATCH] fix: typo Signed-off-by: Sujith --- .../api-plugin-authorization-simple/src/util/hasPermission.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/api-plugin-authorization-simple/src/util/hasPermission.js b/packages/api-plugin-authorization-simple/src/util/hasPermission.js index d068806ae01..f706369e43a 100644 --- a/packages/api-plugin-authorization-simple/src/util/hasPermission.js +++ b/packages/api-plugin-authorization-simple/src/util/hasPermission.js @@ -36,7 +36,7 @@ export default async function hasPermission(context, resource, action, authConte // Parse the provided data to create the permission name to check against (::/) const permissionName = `${resource.split(":").splice(0, 3).join(":")}/${action}`; const resourceElementsArray = resource.split(":"); - const resourceSpecificPermissionName = (Arrar.isArray(resourceElementsArray) && resourceElementsArray.length === 4) + const resourceSpecificPermissionName = (Array.isArray(resourceElementsArray) && resourceElementsArray.length === 4) ? `${resourceElementsArray.join(":")}/${action}` : ""; // make sure shopId is a non-empty string (if provided)