Skip to content

Commit

Permalink
MONDRIAN
Browse files Browse the repository at this point in the history
   Since canAccess is called mostly with a Member, make
   the Member test first.  

[git-p4: depot-paths = "//open/mondrian/": change = 8982]
  • Loading branch information
Richard Emberson committed Mar 29, 2007
1 parent 78c6285 commit 42695cf
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/main/mondrian/olap/RoleImpl.java
Expand Up @@ -508,18 +508,18 @@ public Access getAccess(NamedSet set) {
*/
public boolean canAccess(OlapElement olapElement) {
Util.assertPrecondition(olapElement != null, "olapElement != null");
if (olapElement instanceof Cube) {
return getAccess((Cube) olapElement) != Access.NONE;
} else if (olapElement instanceof Dimension) {
return getAccess((Dimension) olapElement) != Access.NONE;
} else if (olapElement instanceof Hierarchy) {
return getAccess((Hierarchy) olapElement) != Access.NONE;
if (olapElement instanceof Member) {
return getAccess((Member) olapElement) != Access.NONE;
} else if (olapElement instanceof Level) {
return getAccess((Level) olapElement) != Access.NONE;
} else if (olapElement instanceof Member) {
return getAccess((Member) olapElement) != Access.NONE;
} else if (olapElement instanceof NamedSet) {
return getAccess((NamedSet) olapElement) != Access.NONE;
} else if (olapElement instanceof Hierarchy) {
return getAccess((Hierarchy) olapElement) != Access.NONE;
} else if (olapElement instanceof Cube) {
return getAccess((Cube) olapElement) != Access.NONE;
} else if (olapElement instanceof Dimension) {
return getAccess((Dimension) olapElement) != Access.NONE;
} else {
return false;
}
Expand Down

0 comments on commit 42695cf

Please sign in to comment.