Skip to Content
0
Jan 03, 2014 at 10:55 PM

Problems Getting Security Information

28 Views

SDK: BI 4.0 SP6 - I have both the server and the client tools apps installed on my laptop.

I'm working on an application that pulls folder security information (among many other things!) and exports it to a .csv file so that we can analyze it. However, it appears that the security info is not being pulled correctly. Here are the various bits of code that I'm using:

CMS Query:

Select * from CI_INFOOBJECTS where SI_KIND = 'Folder' order by SI_NAME

For each folder returned in the above query, information is stored in a FolderInfo object (a class that I've written):

public FolderInfo (IInfoObject fldr, boolean doAdvanced, boolean favFldr) throws SDKException{

id = fldr.getID();

title = fldr.getTitle();

kind = fldr.getKind();

cuid = fldr.getCUID();

folder = qh.getParentPath(fldr, "CI_APPOBJECTS");

favorite = favFldr;

loadSecurity(fldr, doAdvanced);

}

The loadSecurity() method is this (SecurityInfo is another class that I've created):

protected void loadSecurity(IInfoObject o, boolean doAdvanced) throws SDKException{

ISecurityInfo2 si2 = o.getSecurityInfo2();

IExplicitPrincipals ieps = si2.getExplicitPrincipals();

for (int i = 1; i <= ieps.size(); i++){

IExplicitPrincipal iep = ieps.get(i);

SecurityInfo si = new SecurityInfo(iep, accessLevels, doAdvanced);

hasAdvancedSec = hasAdvancedSec || si.hasAdvancedRights();

security.add(si);

}

}

The problem that I'm running into is that getExplicitPrincipals() is frequently returning only one principal and that is null instead of containing the correct object principal information the security that has been assigned.

What am I doing wrong? Thanks!

-Dell