Looking at the SchemaReader object, there seem to be lots of things missing.
For example, as you point out, getCube() isn't implemented, but it's not
clear how that would help me, even if it were implemented.
What I'm looking for is an API that will return metadata about the objects
the role is allowed to see. For example, suppose a role is allowed to see
only the Sales cube, and within that cube only the Time, Product and Store
dimensions. I need to be able to query the entire schema about the objects
that are visible. The role should have not be able to see that any of the
other dimensions exist.
Does such a thing exist? If not, I'm happy to write it, but I don't want to
re-invent the wheel :-) Is SchemaReader the right interface to modify?
> From: "Julian Hyde" <jhyde@...>
> To: <mondrian-devel@...>
> Subject: RE: [Mondrian-devel] Mondrian Roles and Metadata
> Date: Tue, 20 Apr 2004 17:05:15 -0700
> Reply-To: mondrian-devel@...
> The Schema object returns ALL objects, and ignores access control; to
> view a schema through the lens of access-control, use a SchemaReader.
> You should be able to write
> I just forgot to define SchemaReader.getCubes().
> > -----Original Message-----
> > From mondrian-devel-admin@...
> > [mailtomondrian-devel-admin@...] On Behalf
> > Of Galt Johnson
> > Sent Tuesday, April 20, 2004 403 PM
> > To 'mondrian-devel@...'
> > Subject [Mondrian-devel] Mondrian Roles and Metadata
> > If I create a role that has no access to the schema, but can
> > access a single
> > cube, calls to getCubes() on the connection's schema return
> > all the cubes in
> > the schema.
> > For example, if I have the following role definition
> > <Role name="No Sales Access">
> > <SchemaGrant access="all">
> > <CubeGrant cube="Sales" access="none"/>
> > </SchemaGrant>
> > </Role>
> > and I connect using this role, this call
> > mondrian.olap.Cube cubes =
> > mConnection.getSchema().getCubes();
> > returns all the cubes in the schema.
> > Is this intended? There's a pretty strong argument against
> > this behavior. I
> > would have expected the call to return only the Sales cube.
> > -- Galt