浏览代码

设备增加权限

qinhb 10 月之前
父节点
当前提交
000d704f9c
共有 1 个文件被更改,包括 1 次插入4 次删除
  1. 1 4
      src/directive/permission/index.ts

+ 1 - 4
src/directive/permission/index.ts

@@ -37,10 +37,7 @@ export function checkPerm(str: string) {
   if (roles.includes("ROOT")) {
     return true;
   }
-  const hasPerm = perms?.some((perm) => {
-    return str.includes(perm);
-  });
-  return hasPerm;
+  return perms.includes(str);
 }
 
 /**