Has anyone tried to set up dynamic dimension security
using DSO?
Is it possible to get double quotes into AllowedSet
In the example for allowed members the MDX is
STRTOSET(IIF(USERNAME="",
"{}",SETTOSTR(
GENERATE(
NONEMPTYCROSSJOIN(
[Flat_Geography].[Geography].
MEMBERS,
{STRTOMEMBER("[USERS].[All USERS].
[" + USERNAME + "]"},1)
,{LINKMEMBER([Flat_Geography].
CURRENTMEMBER, [Geography])})))
You can double up the quotes on the above and throw it into a string (e.g. AllowedSet below).
strDimensionSecurity = "<MEMBERSECURITY IsVisible=""True"">"
strDimensionSecurity = strDimensionSecurity & "<PERMISSION Access=""Read"""
strDimensionSecurity = strDimensionSecurity & " AllowedSet=""{" & strAllowedSet & "}"""
strDimensionSecurity = strDimensionSecurity & " /></MEMBERSECURITY>"
dsoRole.SetPermissions "Dimension:Geography", strDimensionSecurity
The DSO runs OK but if you go into allowed members in AS Manager the MDX has been truncated to
STRTOSET(IIF(USERNAME=
i.e. it doesn't seem to like quotes withing the allowedset quotes.
I've tried all sorts of combinations of double double quotes, etc. and The MDX always gets truncated.
Has anyone got any ideas for dealing with this?
Thanks
using DSO?
Is it possible to get double quotes into AllowedSet
In the example for allowed members the MDX is
STRTOSET(IIF(USERNAME="",
"{}",SETTOSTR(
GENERATE(
NONEMPTYCROSSJOIN(
[Flat_Geography].[Geography].
MEMBERS,
{STRTOMEMBER("[USERS].[All USERS].
[" + USERNAME + "]"},1)
,{LINKMEMBER([Flat_Geography].
CURRENTMEMBER, [Geography])})))
You can double up the quotes on the above and throw it into a string (e.g. AllowedSet below).
strDimensionSecurity = "<MEMBERSECURITY IsVisible=""True"">"
strDimensionSecurity = strDimensionSecurity & "<PERMISSION Access=""Read"""
strDimensionSecurity = strDimensionSecurity & " AllowedSet=""{" & strAllowedSet & "}"""
strDimensionSecurity = strDimensionSecurity & " /></MEMBERSECURITY>"
dsoRole.SetPermissions "Dimension:Geography", strDimensionSecurity
The DSO runs OK but if you go into allowed members in AS Manager the MDX has been truncated to
STRTOSET(IIF(USERNAME=
i.e. it doesn't seem to like quotes withing the allowedset quotes.
I've tried all sorts of combinations of double double quotes, etc. and The MDX always gets truncated.
Has anyone got any ideas for dealing with this?
Thanks