BusinessObjects Board

Access Level Lister

Author: Ryan Gordon
Author Notes:

Platform: All
Version: 1.0
Code: See jar file
access_level_rights.zip (14.0 KB)


BoB LoblaW :us: (BOB member since 2007-10-23)

Moderator note:
Approved, and moved to BOB’s Downloads.

And thanks for sharing.

I like your signature :lol:


Marek Chladny :slovakia: (BOB member since 2003-11-27)

I am getting this error:“The specified JVM ‘C:\PROGRA~2\Java\jre6\bin\bin\java.exe’ does not exist or is not a valid executable file.”

I entered the correct patch in tje “Classpath:” when scheduling the program object and then I got this error: “The working directory ‘E:\rights.csv’ could not be found.”

Do I need to setup a JAVA_HOME variable to point to the correct JVM location? Does the administrator user need to have write access over the working folder?

Thanks for sharing and any feedback is appreciated.


rbrito :ecuador: (BOB member since 2007-09-06)

The path listed in that error message has one too many “bin” directories listed. I think the correct path should be C:\PROGRA~2\Java\jre6\bin\java.exe.

Yes, JAVA_HOME should point to the root folder of your Java installation. For example, c:\program files\Java\jre6 (note that you don’t point to the “bin” folder).

When BOE runs a Java program object, you have to specify credentials for a valid BOE user such as administrator. However, when this program tries to write the output to e:\ in this case, it uses the ID that runs the program job server. So your (Windows) service account needs to have rights to e:\ to avoid that error.


BoB LoblaW :us: (BOB member since 2007-10-23)

Hi,

This sounds like a great tool, i have followed the instructions on putting this in the CMC however i am getting an error when trying to run or schedule.

Failed to load class: [com.forumtopics.bob.RightsLister]. Reason: [java.lang.ClassNotFoundException: com.forumtopics.bob.RightsLister].

Can anyone advise why i am getting this issue?

:box:


pyperg (BOB member since 2008-12-31)

Not sure what would cause the class to fail to load. Can you run it from a command window?


BoB LoblaW :us: (BOB member since 2007-10-23)

Hi,

First of all thank you for presenting this solution. I am trynig to get this working but I cant figure out why its not working.

System settings:
BI4.0 Feature pack 3 patch 3
Java 6 update 19

What I did:

  • I renamed the zip to .jar and saved to desktop
  • I added a new program file, Browsed to the .jar file and selected Java
  • I created a rights.csv file on desktop
  • In the default settings screen in parameters settings if filled in:
  • Working directory --> C:\Users\Michel\Desktop\rights.csv
  • Classes to run --> com.forumtopics.bob.RightsLister
  • In program logon i filled in my Windows credentials (they have full admin control)

When I Schedule this program file it says that its failing with the message:
“Error Message:Could not access a directory required to run the program.”

When i specify a working directory without a output file like:

  • C:\Users\Michel\Desktop
    Its showing me Success when i Schedule it, but when i open the file from CMC its opening a program.txt file with the message

Exception in thread “main” java.lang.IllegalArgumentException: An output file name was not specified. Exiting

at com.forumtopics.bob.RightsLister.checkParams(RightsLister.java:85)
at com.forumtopics.bob.RightsLister.run(RightsLister.java:74)
at com.crystaldecisions.sdk.plugin.desktop.program.internal.ProgramWrapper.main(ProgramWrapper.java:174)

I also tried the Command line but this it returning me with the message. Cound not find the main class: com.forumtopics.bob.RightsLister. Program will exit. Example of my command line code:

java.exe -cp “C:\Users\Michel\Desktop\access_level_rights;.” com.forumtopics.bob.RightsLister Michel XXXXXX ZEW-V-913BC091 secEnterprise C:\Users\Michel\Desktop\access_level_rights\rights.csv

or just

java.exe -cp “C:\Users\Michel\Desktop\access_level_rights;.” com.forumtopics.bob.RightsLister

But even then its giving me the same message. “Could nog find main Cass
”

I Hope this is sufficient information. Can you help me out?

Thank you


micheljeweetwel (BOB member since 2010-10-18)

micheljeweetwel,

When running the object in InfoView/CMC, the file name is specified in the “Program Parameters” field when scheduling. This is normally where you enter prompt values if scheduling a report. I would post a screenshot, but it looks like I can’t do so in the downloads forum??

If you are running from a command line, the path to the BOE .jar files have to be included in your classpath. So instead of this:

java.exe -cp "C:\Users\Michel\Desktop\access_level_rights;." com.forumtopics.bob.RightsLister Michel XXXXXX ZEW-V-913BC091 secEnterprise C:\Users\Michel\Desktop\access_level_rights\rights.csv

use this:

java.exe -cp "C:\Users\Michel\Desktop\access_level_rights;.;C:\Program Files\Business Objects\common\4.0\java\lib\*" com.forumtopics.bob.RightsLister Michel XXXXXX ZEW-V-913BC091 secEnterprise C:\Users\Michel\Desktop\access_level_rights\rights.csv

Hope that helps.


BoB LoblaW :us: (BOB member since 2007-10-23)

Hi BoB LoblaW,

Works like a charm !!! thank you for this tool. I was looking at the output and i can see that this lists all the objects which are granted to an Access Level. Is it also possible to see the full list (Unassigned, Granted and Assigned)? Within the CMC you can do that by selecting the common filter setting to “No filters”. This is probably an enhancment on your current version. The reason why i am asking this is because when your documenting your BI security environment and something changes, you dont have to do an extract every time and you have basically all the rights available documented in your output.

Again, many thanks.

Kind regards,

Michel


micheljeweetwel (BOB member since 2010-10-18)

Good to hear. There was an issue, the details of which escape me at the moment, which prevented all the rights from being retrieved so I stopped pursuing that option. Also, the ever present time constraint reared its head. Regardless, I don’t fully understand your reasoning behind this. If the rights in an access level change, wouldn’t you want to run the program again to pick up the changes?


BoB LoblaW :us: (BOB member since 2007-10-23)

Will this work for XIR2 version


billa (BOB member since 2008-06-11)

No, this won’t work with XI R2 because custom access levels were introduced in XI 3.1.


BoB LoblaW :us: (BOB member since 2007-10-23)

Missed the part about renaming the zip to a jar. A few other clarifications for others:
The output path and filename goes in the Arguments field of the Program Parameters tab. Working directory and Classpath don’t appear necessary in the CMC.
I suggest using .txt instead of .csv since it’s not comma-separated.

For the command line class path I had to add access_level_rights.jar, not just access_level_rights, or * instead. And the * is definitely necessary after the java lib directory as the newer example has.


craiggsmith (BOB member since 2009-06-01)

Hi
Thanks for the great SDK code

[b]Further if you could help us with export of Groups, FoldersName along with Access Levels that would be great


As we can solve our problem to export Folder Security for BO Enviroment

Looking for update on the post 
[/b]

Here is the more information on Scheduling this program as .csv format.

under Program Parameters enter fields as below.

  1. Arguments: output file complete path (i.e D:\BOTEMP\rights.csv)
  2. Class to run : com.forumtopics.bob.RightsLister
  3. Class Path : C:\Program Files\Business Objects\common\4.0\java\lib*
  4. JVM arguments & Working Directory fields you can keep them blank.

under Program Logon:
enter the BO user/pass: (administrator user can be used)

Thanks
Jatinder Bhatti


Jatinder Bhatti (BOB member since 2016-03-04)

No files show, even after schedule run is successful. Checked many times, with all the attempts listed here. Tried the command prompt, but the C:/Business Objects/Common directory does not exist with 4.2 Any ideas?


sapaa (BOB member since 2014-02-21)

I created a folder at the root level of my C drive called RightsLister for ease of access, added the jar file to it, and use the following batch file. Note that it only returns custom levels, so if you want to see the rights for standard levels you have to copy them. There are a few rights that come back as Unknown right in 4.2; most are related to new features such as BI commentary or send to SFTP, but some I could not find a match for. There is even one right that displays as Unknown right in the CMC!

@echo off

set /p server=server:
set /p username=username:
set /p password=password:
cls

java.exe -cp “C:\RightsLister*;C:\Program Files (x86)\SAP BusinessObjects\SAP BusinessObjects Enterprise XI 4.0\java\lib*” com.forumtopics.bob.RightsLister %username% %password% %server%.csw.l-3com.com secEnterprise C:\RightsLister\access_level_rights_%server%.txt

start “” /b “C:\Program Files (x86)\Microsoft Office\Office14\excel.exe” C:\RightsLister\access_level_rights_%server%.txt


craiggsmith (BOB member since 2009-06-01)

got it to work!!! with some modifications on your batch!!!


sapaa (BOB member since 2014-02-21)

You can access those info from QueryBuilder.
But yes, its output is 
 [b]difficult to export

or isn’t it ? [/b]

BICLEVER ( dot com ) offers a FREE tool ( .exe, sorry, for windows ) that is called “CMSquerybuilder”
It accepts exactly the same queries that you put in QueryBuilder, but has an option to “export to excel”

Seems to work now with 4.2 (client tools installed) and MS Office 64bit

And I guess there will be a “thanks” from me too.
Now trying to get this to work, looks very promising.


RensH :belgium: (BOB member since 2007-06-18)