Databases Reference
In-Depth Information
get the employee member for the user who has logged in. The preceding
MDX expression completes the operation of identifying the employee member
for the corresponding login using the MDX function username. The username
MDX function returns the <domainname>\<loginname>. Finally, the third line
in the MDX expression extracts the loginname. This loginname is used in the
condition of the Filter MDX function to iterate through all the members of the
employee hierarchy and extract the member(s) where the employee name
contains the login name.
To extract the login name from the employee name, the VBA function "Instr" is
used. The result of the MDX expression is the correct employee member
name. Most companies do not have login names that match exactly to the
first name or last name of the employees. In such a case you would need to
form a complex MDX expression that will return the correct employee mem-
ber for the Allowed set. You will see an example of a complex MDX expres-
sion in this chapter under the Securing your Cube Data section.
To test the preceding solution you can go to the cube browser and bring up
the user of interest as shown in Figure 19-23 . Analysis Services now imper-
sonates the user account specified in the Other User option to access the
cube data. Security restrictions are applied to the user based on the roles that
user is part of. You can now browse the dimensions and cell values in the
cube browser to ensure your security restrictions were applied correctly.
Search WWH ::




Custom Search