Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
FType iHub Security Help
jlux33
<p>I am using the FType iHub with BIRT OS Developer. I have data with a field that corresponds to security groups in iHub. I put the code below in the beforeOpen script on the DATA SET. I have created a MultiSelect Parameter called SecurityRoles.</p>
<p> </p>
<p>How do I set the parameter SecurityRoles equal to the aclArray in the beforeOpen script so I can use it is a WHERE condition in the DATA SET?</p>
<p> </p>
<div>function createAclArrayinBDPro(array){</div>
<div> var myStr = "";</div>
<div> for(var i in array){</div>
<div> myStr = myStr + array
+ ",";</div>
<div> logger.warning (myStr);</div>
<div> }</div>
<div> myStr = myStr.substring(0,myStr.length -1);</div>
<div> return myStr;</div>
<div>}</div>
<div> </div>
<div>function createAclArrayinServer(arraylist){</div>
<div> var myStr = "'";</div>
<div> for(i=0; i<arraylist.size(); i++){</div>
<div> myStr = myStr + arraylist
+ "','"; </div>
<div> }</div>
<div> myStr = myStr.substring(0,myStr.length-2);</div>
<div> return myStr;</div>
<div>}</div>
<div> </div>
<div> </div>
<div>var serverContext = reportContext.getAppContext().get("ServerContext");</div>
<div>var aclArray = "";</div>
<div> </div>
<div>// check to see if it's run on the server (BIRT Designer Pro or iHub)</div>
<div>//</div>
<div>if(serverContext.getVolumeName() == null) {</div>
<div>aclArray = createAclArrayinBDPro(reportContext.getAppContext().get("USER_ACL"));</div>
<div>}</div>
<div>else {</div>
<div>aclArray = createAclArrayinServer(serverContext.getUserRoles());</div>
<div>}</div>
<div> </div>
<div>theUsername = reportContext.getAppContext().get("ServerUserName") ;</div>
<div> </div>
Find more posts tagged with
Comments
micajblock
<p>I think this will give you the Devshare below will give you the answer. BTW I am not sure the OS BIRT designer has these functions. You might want to use BIRT Designer Professional. You can get a 90 day eval here - <a data-ipb='nomediaparse' href='
http://www.actuate.com/resources/product-downloads/'>http://www.actuate.com/resources/product-downloads/</a></p>
;
<p> </p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/998-limit-parameter-selectors-based-on-security/'>http://developer.actuate.com/community/forum/index.php?/files/file/998-limit-parameter-selectors-based-on-security/</a></p>
;