Interviewer - Server Admin > Customizing UNICOM Intelligence Interviewer - Server Admin > Adding activities to UNICOM Intelligence Interviewer - Server Admin > Common tasks in activity development > Adding roles to projects or activities
 
Adding roles to projects or activities
If you are customizing UNICOM Intelligence Interviewer - Server Admin, you may want your program to add roles to projects or activities, rather than having the administrator do this manually. The DPM Explorer sample tool that is supplied with source code as part of the UNICOM Intelligence Developer Documentation Library illustrates how to do this using Visual Basic .NET.
The statements you need to include in your program are as follows:
Dim oAccessCtrl As SPSSMR.DPM.Security.Authorization.IAccessControl
oAccessCtrl = DirectCast(oDPMObject, SPSSMR.DPM.Security.Authorization.IAccessControl)
oAccessCtrl.AddAuthorizedRole(Value)
In these statements, oDPMObject is a Project or Application object, and Value is the role to be assigned.
For a complete example, refer to the Add_Role_Click() function in the source code for DPM Explorer. This is installed in Code\Tools\VB.NET\DPM Explorer.Net\frmMain.vb in the folder in which the UNICOM Intelligence Developer Documentation Library is installed.
See also
Common tasks in activity development