THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

perf[permission.js]: remove useless code (#3301)

pull/3304/head
dyz 3 months ago
committed by GitHub
parent
commit
ea60478304
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions
  1. +1
    -5
      src/utils/permission.js

+ 1
- 5
src/utils/permission.js View File

@ -13,11 +13,7 @@ export default function checkPermission(value) {
const hasPermission = roles.some(role => {
return permissionRoles.includes(role)
})
if (!hasPermission) {
return false
}
return true
return hasPermission
} else {
console.error(`need roles! Like v-permission="['admin','editor']"`)
return false

Loading…
Cancel
Save