public class AccessControlTest extends FoodMartTestCase
AccessControlTest
is a set of unit-tests for access-control.
For these tests, all of the roles are of type RoleImpl.Role
Modifier and Type | Class and Description |
---|---|
static class |
AccessControlTest.PeopleRole |
FoodMartTestCase.QueryAndResult
propSaver
Constructor and Description |
---|
AccessControlTest(String name) |
Modifier and Type | Method and Description |
---|---|
void |
_testSharedObjectsInGrantMappingsBug() |
void |
testBugBiserver1574()
Test case for
BISERVER-1574,
"Cube role rollupPolicy='partial' failure".
|
void |
testBugBiserver2491()
this tests the fix for
http://jira.pentaho.com/browse/BISERVER-2491
rollupPolicy=partial and queries to upper members don't work
|
void |
testBugMondrian_1201_CacheAwareOfRoleAccessControl() |
void |
testBugMondrian_1201_MultipleMembersInRoleAccessControl()
Tests for Mondrian BUG 1201 - Native Rollups did not handle
access-control with more than one member where granted access=all
|
void |
testBugMondrian1030_2()
This is a test for
MONDRIAN-1030
When a query is based on a level higher than one in the same hierarchy
which has access controls, it would only constrain at the current level
if the rollup policy of partial is used.
|
void |
testBugMondrian1127MultipleSlicers() |
void |
testBugMondrian1127OneSlicerOnly()
Tests for Mondrian BUG 1127 - Native Top Count was not taking into
account user roles
|
void |
testBugMondrian402()
Test case for bug
MONDRIAN-402, "Bug in RolapCubeHierarchy.hashCode() ?".
|
void |
testBugMondrian435()
Testcase for bug
MONDRIAN-435, "Internal error in HierarchizeArrayComparator".
|
void |
testBugMondrian436()
|
void |
testBugMondrian568()
Test for bug MONDRIAN-568.
|
void |
testBugMondrian622()
Test case for bug
MONDRIAN-622,
"Poor performance with large union role".
|
void |
testBugMondrian694()
|
void |
testBugMondrian722()
|
void |
testBugMondrian935()
|
void |
testCalcMemberLevel()
|
void |
testDimensionGrant() |
void |
testGoodman()
|
void |
testGrantDimensionNone() |
void |
testGrantHierarchy1a() |
void |
testGrantHierarchy1aAllMembers() |
void |
testGrantHierarchy1b() |
void |
testGrantHierarchy1c() |
void |
testGrantHierarchy2() |
void |
testGrantHierarchy3() |
void |
testGrantHierarchy4() |
void |
testGrantHierarchy5() |
void |
testGrantHierarchy6() |
void |
testGrantHierarchy7() |
void |
testGrantHierarchy8() |
void |
testGrantHierarchy8AllMembers() |
void |
testGrantHierarchy9()
Tests that we only aggregate over SF, LA, even when called from
functions.
|
void |
testGrantHierarchyA() |
void |
testMondrian1030()
This is a test for MONDRIAN-1030.
|
void |
testMondrian1091()
Test for
MONDRIAN-1091
The RoleImpl would try to search for member grants by object identity
rather than unique name.
|
void |
testMondrian1259()
|
void |
testMondrian1295() |
void |
testMondrian1434() |
void |
testMondrian1486()
Fix for
MONDRIAN-1486
When NECJ was used, a call to RolapNativeCrossJoin.createEvaluator
would swap the
RolapHierarchy.LimitedRollupMember for the regular all member
of the hierarchy, effectively removing security constraints. |
void |
testMondrian936() |
void |
testNoAccessToCube() |
void |
testNonEmptyAccess()
Test to verify that non empty crossjoins enforce role access.
|
void |
testNonEmptyAccessLevelMembers() |
void |
testParentChildUserDefinedRole() |
void |
testPartialRollupParentChildHierarchy() |
void |
testRestrictMeasures() |
void |
testRoleMemberAccess() |
void |
testRoleMemberAccessNonExistentMemberFails() |
void |
testRoleUnionWithLevelRestrictions()
This is a test for
MONDRIAN-1168
Union of roles would sometimes return levels which should be restricted
by ACL.
|
void |
testRollupBottomLevel()
Tests that members below bottom level are regarded as visible.
|
void |
testRollupPolicyAll()
The total for [Store].[All Stores] is similarly reduced.
|
void |
testRollupPolicyAllAsDefault()
Access [Store].[All Stores] implicitly as it is the default member
of the [Stores] hierarchy.
|
void |
testRollupPolicyAllAsParent()
Access [Store].[All Stores] via the Parent relationship (to check
that this doesn't circumvent access control).
|
void |
testRollupPolicyBasic()
Basic test of partial rollup policy.
|
void |
testRollupPolicyGreatGrandchildInvisible()
Tests where all children are visible but a grandchild is not.
|
void |
testRollupPolicyNegative()
Tests that a bad value for the rollupPolicy attribute gives the
appropriate error.
|
void |
testRollupPolicySimultaneous()
Tests where two hierarchies are simultaneously access-controlled.
|
void |
testRollupPolicyWithNative() |
void |
testSchemaReader() |
void |
testUnionRole() |
void |
testUnionRoleHasInaccessibleDescendants()
This is a test for
MONDRIAN-1384
|
void |
testUnusedAccessControlledDimension()
Tests that an access-controlled dimension affects results even if not
used in the query.
|
void |
testValidMeasureWithRestrictedCubes() |
void |
testVirtualCube()
Tests that hierarchy-level access control works on a virtual cube.
|
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, getTestContext, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, tearDown, warehouseMembersCanadaMexicoUsa
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, toString
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
public AccessControlTest(String name)
public void testSchemaReader()
public void testGrantDimensionNone()
public void testRestrictMeasures()
public void testRoleMemberAccessNonExistentMemberFails()
public void testRoleMemberAccess()
public void testGrantHierarchy1a()
public void testGrantHierarchy1aAllMembers()
public void testGrantHierarchy1b()
public void testGrantHierarchy1c()
public void testGrantHierarchy2()
public void testGrantHierarchy3()
public void testGrantHierarchy4()
public void testGrantHierarchy5()
public void testGrantHierarchy6()
public void testGrantHierarchy7()
public void testGrantHierarchy8()
public void testGrantHierarchy8AllMembers()
public void testBugMondrian_1201_MultipleMembersInRoleAccessControl()
public void testBugMondrian_1201_CacheAwareOfRoleAccessControl()
public void testBugMondrian1127OneSlicerOnly()
public void testBugMondrian1127MultipleSlicers()
public void testGrantHierarchy9()
public void testGrantHierarchyA()
public void _testSharedObjectsInGrantMappingsBug()
public void testNoAccessToCube()
public void testRollupPolicyBasic()
public void testRollupPolicyAll()
public void testRollupPolicyAllAsDefault()
public void testRollupPolicyAllAsParent()
public void testUnusedAccessControlledDimension()
public void testRollupBottomLevel()
public void testRollupPolicyNegative()
public void testRollupPolicyGreatGrandchildInvisible()
public void testRollupPolicySimultaneous()
public void testUnionRole()
public void testUnionRoleHasInaccessibleDescendants() throws Exception
Exception
public void testRoleUnionWithLevelRestrictions() throws Exception
Exception
public void testNonEmptyAccess()
public void testNonEmptyAccessLevelMembers()
public void testGoodman()
public void testBugMondrian402()
public void testPartialRollupParentChildHierarchy()
public void testParentChildUserDefinedRole()
public void testBugBiserver1574()
SchemaReader.getMemberParent(mondrian.olap.Member)
when called
on a members returned in a result set. JPivot calls that method but
Mondrian normally does not.public void testBugMondrian435()
public void testBugMondrian436()
public void testVirtualCube()
public void testBugBiserver2491()
public void testBugMondrian622()
public void testBugMondrian694()
public void testBugMondrian722()
public void testCalcMemberLevel()
public void testBugMondrian568()
public void testBugMondrian935()
public void testMondrian1030() throws Exception
ie: If a union of roles give access to two two sibling root members and the level to which they belong is not included in a query, the returned cell data would be that of the first sibling and would exclude those of the second.
This is because the RolapEvaluator cannot represent default members as multiple members (only a single member is the default member) and because the default member is not the 'all member', it adds a constrain to the SQL for the first member only.
Currently, Mondrian disguises the root member in the evaluator as a RestrictedMemberReader.MultiCardinalityDefaultMember. Later, RolapHierarchy.LimitedRollupSubstitutingMemberReader will recognize it and use the correct rollup policy on the parent member to generate correct SQL.
Exception
public void testBugMondrian1030_2()
Example. A query on USA where only Los-Angeles is accessible would return the values for California instead of only LA.
public void testMondrian1091() throws Exception
Exception
public void testMondrian1259() throws Exception
Enhancements made to the SmartRestrictedMemberReader were causing security leaks between roles and potential class cast exceptions.
Exception
public void testMondrian1434()
public void testMondrian1486() throws Exception
RolapHierarchy.LimitedRollupMember
for the regular all member
of the hierarchy, effectively removing security constraints.Exception
public void testRollupPolicyWithNative()
public void testValidMeasureWithRestrictedCubes()