@@ -59,6 +59,19 @@ todo add optional parameter WEBAPP to Alter web app name if it needs to have ano
5959<Namespace Name="Samples" Create="no">
6060<ClassMapping From="${Namespace}" Package="MDX2JSON"/>
6161</Namespace>
62+
63+ <IfDef Var="User" >
64+ <IfDef Var="Password">
65+ <User Username="${User}" Namespace="${Namespace}" PasswordVar="Password" Roles="%DB_${Namespace}" Enabled="true" Comment="MDX2JSON user" Fullname="MDX2JSON user" >
66+ </User>
67+ <RunInstall Class="MDX2JSON.Installer" Method="GrantSelectToUserInstaller"/>
68+ <Log Text="User modifyed/created and granted SELECT access to all tables in ${Namespace}" Level="0"/>
69+ </IfDef>
70+ <IfNotDef Var="Password">
71+ <Log Text="You specified username but not a password" Level="0"/>
72+ </IfNotDef>
73+ </IfDef>
74+
6275</Manifest>
6376]]> </Data >
6477</XData >
@@ -348,11 +361,25 @@ Returns comma-separated list of all local availible namespaces</Description>
348361]]> </Implementation >
349362</Method >
350363
364+ <Method name =" GrantSelectToUserInstaller" >
365+ <Description >
366+ Grant select access to User to all tables in comma-separated list of namespaces</Description >
367+ <ClassMethod >1</ClassMethod >
368+ <FormalSpec >pVars,pLogLevel,tInstaller</FormalSpec >
369+ <ReturnType >%Status</ReturnType >
370+ <Implementation ><![CDATA[
371+ set user=pVars("User")
372+ set namespace= pVars("Namespace")
373+ return ..GrantSelectToUser(user,namespace)
374+ ]]> </Implementation >
375+ </Method >
376+
351377<Method name =" GrantSelectToUser" >
352378<Description >
353379Grant select access to User to all tables in comma-separated list of namespaces</Description >
354380<ClassMethod >1</ClassMethod >
355381<FormalSpec >User:%String,NamespacesList:%String="*"</FormalSpec >
382+ <ReturnType >%Status</ReturnType >
356383<Implementation ><![CDATA[
357384 set:NamespacesList="*" NamespacesList=..GetNSList()
358385 set basens=$Namespace
0 commit comments