Add a user role
As part of the form design process, you can specify user roles, or specific categories of users. For example, in a human resources department, you can specify different user roles for recruiters, managers, and human resource specialists.
Security User roles allow you to present alternative views or behavior to different sets of users. They should not be used to restrict access to sensitive data in a form. Even if you make a form read-only or hide certain controls based on user roles, users can potentially use a text editing program such as Microsoft Notepad to view or modify the form (.xml) file.
- On the Tools menu, click User Roles.
- In the Manage User Roles dialog box, click Add.
- In the Add User Role dialog box, type a name in the Role name box.
- To assign users or groups of users to the role, do one or more of the following:
Specify one or more users who are part of a network
- Select the User names check box, and then click Select one or more users .
Note If you already know the domain and user name, you can type it in the User names box. It must be in the format domain\user name. Separate multiple user names with semicolons.
- In the Enter the object names to select box in the Select Users dialog box, type one or more user names, separated by semicolons.
Note For information about how to format the user names, click the examples link.
- To check the user names that you typed against the names in the network, click Check Names.
- Click OK.
Specify one or more groups that are part of a network
- Select the Group names check box, and then click Select one or more groups .
Note If you already know the group name, you can type it in the Group names box. It must be in the format domain\group name. Separate multiple group names with semicolons.
- In the Enter the object names to select box in the Select Groups dialog box, type one or more group names, separated by semicolons.
Note For more information about how to format the group names, click the examples link.
- To check the group names that you typed against the names in the network, click Check Names.
- Click OK.
Specify user names that come directly from the form
- Select the User names from the form check box, and then click Select a field in the data source .
- In the Select a Field or Group dialog box, click the field that provides the values that you want for the user roles, and then click OK.
- Select the User names check box, and then click Select one or more users .
- To set the user role as the initiator role, which is the role that is used whenever a new blank form is opened for the first time, select the Set as initiator check box.
Note When a user role is specified as the initiator, it takes precedence over all other role assignments.
- If you customized a control's behavior based on user role, or if you're using rules to switch views based on user role, you can make sure that everything works by testing your form.
- On the File menu, point to Preview Form, and then click With User Role.
- In the Choose User Role to Preview dialog box, click the role that you want to preview.
The name of the current user role appears on the status bar in the preview window.
Note If you click Preview Form on the Standard toolbar, Microsoft Office InfoPath 2003 displays whatever view is associated with the default user role.
Notes
- To specify a default user role for users who aren't assigned to any other role, select the role in the Manage User Roles dialog box, and then click Set as Default.
- If you assigned groups of users to a user role, users belonging to that group must be online for the user role assignment to take effect. If a user is working offline, InfoPath uses the default user role to open the form.
- The information in this topic may not apply if you are working with a form designed using Microsoft Office InfoPath 2003 without the service pack installed. Learn more