MCPcopy Create free account
hub / github.com/apache/cloudstack / get

Function get

ui/src/utils/helper/permission.js:28–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

26 !app.config.globalProperties.$auth && Object.defineProperties(app.config.globalProperties, {
27 $auth: {
28 get () {
29 const _this = this
30 return (permissions) => {
31 const [permission, action] = permissions.split('.')
32 const permissionList = _this.$store.getters.roles.permissions
33 return permissionList.find((val) => {
34 return val.permissionId === permission
35 }).actionList.findIndex((val) => {
36 return val === action
37 }) > -1
38 }
39 }
40 }
41 })
42

Callers 1

orderByFilterFunction · 0.85

Calls 1

findMethod · 0.65

Tested by

no test coverage detected