Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
v2.6.1
-
macOs
Description
There is no planner page for none ROLE_ADMIN user ,even though he has ADMIN access for the project.
I found in webapp/app/partials/cubes/cube_detail.html line44
<li class="{{cube.visiblePage=='planner'? 'active':''}}" ng-if="(userService.hasRole('ROLE_ADMIN') || hasPermission(cube, permissions.ADMINISTRATION.mask)) && isShowCubeplanner"> <a href="" ng-click="cube.visiblePage='planner';getCubePlanner(cube);">Planner</a> </li>
but other place the hasPermission function use as
hasPermission('cube',cube, permissions.ADMINISTRATION.mask)
the function hasPermission is defined in webapp/app/js/controllers/page.js line100
$scope.hasPermission = function (accessType, entity){ ... if (accessType === 'cube') { project = entity.project } else if (accessType === 'project') { project = entity && entity.name || entity.selectedProject } else if (accessType === 'model') { project = ProjectModel.getProjectByCubeModel(entity.name) } ... }
I guess whether it's cause by no param of accessType.
Attachments
Attachments
Issue Links
- links to