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

Function hasAccessToSection

ui/src/store/modules/permission.js:32–42  ·  view source on GitHub ↗
(route)

Source from the content-addressed store, hash-verified

30}
31
32function hasAccessToSection (route) {
33 const visibleChildren = route.children.filter(child => !child.hidden)
34 if (visibleChildren.length === 0) {
35 return false
36 }
37 const redirect = '/' + visibleChildren[0].meta.name
38 if (redirect !== route.path) {
39 route.redirect = redirect
40 }
41 return true
42}
43
44function filterAsyncRouter (routerMap, apis) {
45 const accessedRouters = routerMap.filter(route => {

Callers 1

filterAsyncRouterFunction · 0.85

Calls 1

filterMethod · 0.45

Tested by

no test coverage detected