From e11cb4afb2765b0c6c3431450c5a8b056bacdeba Mon Sep 17 00:00:00 2001 From: Nuoky Date: Sun, 14 Oct 2018 09:00:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20#2508=EF=BC=8Cstring=20type=20not=20equa?= =?UTF-8?q?l=20will=20still=20pass=20(#2523)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Authorized/CheckPermissions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Authorized/CheckPermissions.js b/src/components/Authorized/CheckPermissions.js index 5bc225e3..ba83f5b9 100644 --- a/src/components/Authorized/CheckPermissions.js +++ b/src/components/Authorized/CheckPermissions.js @@ -48,7 +48,7 @@ const checkPermissions = (authority, currentAuthority, target, Exception) => { if (Array.isArray(currentAuthority)) { for (let i = 0; i < currentAuthority.length; i += 1) { const element = currentAuthority[i]; - if (authority.indexOf(element) >= 0) { + if (authority === element) { return target; } } -- GitLab