Explorar el Código

设备增加权限

qinhb hace 10 meses
padre
commit
000d704f9c
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  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);
 }
 
 /**