In a message dated 01-06-11 11:03:59 EDT, you write:
I have universe defined against the repository
tables but I have not been able to produce a simple query producing username and configuration (like whether they have access to BO,WebI, both).
I know this can be done from the Supervisor module but I am trying to produce a nice clean/simple format.
username, bo, webi
username, bo,
username, , webi
Remember that each user can exist in multiple groups, so your report really has no meaning without the group name as well. You need the group name, the user name, and the role the user has in that group. The information that you need is contained in the OBJ_M_ACTOR and OBJ_M_ACTORLINK tables. These tables are recursive, so you will use each of them twice. The SQL looks something like this:
select users.m_actor_n_id user_id
, users.m_actor_c_name user_name
, link.M_ACTL_N_ACTORTYPE user_role
, groups.m_actor_c_name group_name
from obj_m_actor users
, obj_m_actorlink link
, obj_m_actorlink parent
, obj_m_actor groups
where users.m_actor_n_type = 16
and users.m_actor_n_id = link.m_actl_n_actorid and link.m_actl_n_fatlinkid = parent.m_actl_n_id and parent.m_actl_n_actorid = groups.m_actor_n_id
The restriction for actor type = 16 means that group definitions are ignored.
This select gives you the user name, the code for their role, and their group where they perform that role. The important piece is in uppercase: M_ACTL_N_ACTORTYPE. That field contains a “bit map” value, where the binary bits denote which applications are on or off. The values, according to the documentation on my cd, are:
BOAT_GENERALSUPERVISOR 2
BOAT_SUPERVISOR 4
BOAT_DESIGNER 8
BOAT_USER 16
BOAT_DS 32
My docs are old; there is an additional value of 64 that means “Versatile”. I don’t remember which version of BusObj introduced the concept of a versatile profile.
To make matters more confusing, these values can be combined. Someone that is both a Supervisor and a Designer would have a value of 4 + 8 or 12. If you wanted to get fancy, you would do a binary bit test for each value. Since there are only six “interesting” values, I would simply hard code the items in a decode / case / other RDBMS equivalent. For example, for Oracle my final query looks like:
select users.m_actor_n_id
, users.m_actor_c_name
, decode(link.M_ACTL_N_ACTORTYPE,
2, ‘General Supervisor’,
4, ‘Supervisor’,
8, ‘Designer’,
12, ‘Supervisor/Designer’,
16, ‘Business Objects’,
32, ‘BCA Queue’,
64, ‘Versatile’, ‘Other Unknown at this time’) User_Role , groups.m_actor_c_name group_name
from obj_m_actor users
, obj_m_actorlink link
, obj_m_actorlink parent
, obj_m_actor groups
where users.m_actor_n_type = 16
and users.m_actor_n_id = link.m_actl_n_actorid and link.m_actl_n_fatlinkid = parent.m_actl_n_id and parent.m_actl_n_actorid = groups.m_actor_n_id
You can “presume” the applications available for any of these profiles. Anyone has access to BusinessObjects / Webi. Designers have access to BO and Designer. And so on. The only role where you cannot “presume” the applications is Versatile. For that role, you would need to look further into the OBJ_M_RESLINK table, joining to the OBJ_M_ACTORLINK table. The resource records are type 6. It gets more complicated from there, but if you are not using the Versatile user profile, you don’t need to worry about this part.
If you can replicate this SQL in your universe, then you can create this report.
Regards,
Dave Rathbun
Integra Solutions
www.islink.com
Listserv Archives (BOB member since 2002-06-25)