You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "XiaoXiang Yu (JIRA)" <ji...@apache.org> on 2019/07/03 06:09:00 UTC

[jira] [Commented] (KYLIN-4066) No planner for not ROLE_ADMIN user on WebSite

    [ https://issues.apache.org/jira/browse/KYLIN-4066?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16877513#comment-16877513 ] 

XiaoXiang Yu commented on KYLIN-4066:
-------------------------------------

+1 should be modified

> No planner for not ROLE_ADMIN user on WebSite
> ---------------------------------------------
>
>                 Key: KYLIN-4066
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4066
>             Project: Kylin
>          Issue Type: Bug
>          Components: Website
>    Affects Versions: v2.6.1
>         Environment: macOs 
>            Reporter: langdamao
>            Priority: Major
>              Labels: easyfix
>             Fix For: Future
>
>
> 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
> {code:java}
> <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>
> {code}
> but other place the hasPermission function use as
> {code:java}
> hasPermission('cube',cube, permissions.ADMINISTRATION.mask) 
> {code}
> the function hasPermission is defined in webapp/app/js/controllers/page.js line100
> {code:java}
> $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)
> }
> ...
> }{code}
> I guess whether it's cause by no param of accessType.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)