mysticfall / pivot4j

Pivot4J provides a common API for OLAP servers which can be used to build an analytical service frontend with pivot style GUI.
Other
128 stars 101 forks source link

Hide cube without permission #203

Closed gascani closed 8 years ago

gascani commented 8 years ago

I've got a schema with 2 cubes (ex: cubeA, cubeB) and a role: testRole:

`

`

When I access to pivot4j-analytics with role "testRole" setted in my connection I can see both cubes (even if I've got permission only for cubeA) and if I select "cubeB" I've got the Exception:

"mondrian.olap.MondrianException: Mondrian Error:MDX cube 'cubeB' not found"

How can I filter cube list removing the cube the role can't access to?

Thanks, Giorgio

mysticfall commented 8 years ago

Pivot4J depends on Olap4J's API to determine if a given cube is accessible or not. It assumes it can access a cube if isVisible() method returns true for it.

Maybe we can implement another check to see if it really has access, if we can't rely on isVisible() method. But I'm not too sure at this point if it's something really possible.

Can you post the full stacktrace here? Maybe it can give a hint as to what operation can be used as a check as it fails without a proper permission.

gascani commented 8 years ago

Thank you for the hint. I noticed that i was setting the role on connection only after checking available cubes. Setting the role when the connection is created solves the problem.

Thanks again, Giorgio

mysticfall commented 8 years ago

Thanks for letting me know, and I'm glad you found the real problem :) I'll close this issue now.