Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-4066

No planner for not ROLE_ADMIN user on WebSite

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • v2.6.1
    • v3.0.0-beta, v2.6.4
    • Website
    • 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

        1. image-2019-09-19-16-26-08-142.png
          179 kB
          Yaqian Zhang

        Issue Links

          Activity

            People

              Unassigned Unassigned
              langdamao langdamao
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: