We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25807f2 commit 2a4730eCopy full SHA for 2a4730e
src/utils/helper/permission.js
@@ -22,12 +22,11 @@ function plugin (Vue) {
22
return (permissions) => {
23
const [permission, action] = permissions.split('.')
24
const permissionList = _this.$store.getters.roles.permissions
25
- permissionList.find((val) => {
+ return permissionList.find((val) => {
26
return val.permissionId === permission
27
}).actionList.findIndex((val) => {
28
return val === action
29
- })
30
- return false
+ }) > -1
31
}
32
33
0 commit comments