Create permissions for an ABContact subtype in ContactManager

Procedure

  1. If necessary, start Guidewire Studio for ContactManager.

    At a command prompt, navigate to the ContactManager installation folder and enter the following command:

    gwb studio
  2. In Guidewire Studio for ContactManager, press Ctrl+Shift+N and search for SystemPermissionType.ttx.
  3. Double-click SystemPermissionType.ttx in the search results to open this typelist in an editor.
  4. Add one or more new typecodes to SystemPermissionType.ttx.
    For example, for each of the following contact permission typecodes, right-click an existing typecode and choose Add new > typecode. Then enter the information for the new typecode.
    Code Name Description
    abpersoncreate Create an ABPerson instance Permission to create an instance of an ABPerson subtype
    abpersonview View an ABPerson instance Permission to view an instance of an ABPerson subtype
    abpersonedit Edit an ABPerson instance Permission to edit an instance of an ABPerson subtype
    abpersondelete Delete an ABPerson instance Permission to delete an instance of an ABPerson subtype
  5. In the Project window, navigate to configuration > config > security and then double-click security-config.xml.
  6. Associate the new permissions with an ABContact subtype in the security-config.xml file.
    For example, map the new typecodes to the ABPerson contact subtype as follows:
    <ContactPermissions>
      <ContactSubtypeAccessProfile entity="ABPerson">
        <ContactCreatePermission permission="abpersoncreate"/>
        <ContactViewPermission permission="abpersonview"/>
        <ContactEditPermission permission="abpersonedit"/>
        <ContactDeletePermission permission="abpersondelete"/>
      </ContactSubtypeAccessProfile>  
    </ContactPermissions>

    This entry might be the only ContactPermissions entry in the file. By default, the file contains a set of StaticHandler entries for system permissions.

  7. Stop the ContactManager server, optionally regenerate the data and security dictionaries, and then restart ContactManager, as follows:
    1. At a command prompt open in the ContactManager installation folder, enter the following command:
      gwb stopServer
    2. At a command prompt open in the ContactManager installation folder, optionally regenerate the data and security dictionaries:
      gwb genDataDictionary

      Regenerating the Security Dictionary is a good way to find out if there is a problem with the new definitions.

    3. Restart ContactManager:
      gwb runServer
  8. Add the new permissions to a new user role.
    1. Log in to ContactManager as a user that has the User Admin role.
      For example, user name su with password gw.
    2. Click the Administration tab.
    3. In the sidebar, click Users & Security > Roles.
    4. In the Roles screen, click Add Role.
    5. For Name enter ABPerson Manager.
    6. Add the following set of permissions to the role.

      For each of the following permissions, click Add and then click in the new field. Then choose a permission from the drop-down list:

      • Create an ABPerson instance
      • Create contact with any tag
      • Delete an ABPerson instance
      • Delete contact with any tag
      • Edit an ABPerson instance
      • Edit contact with any tag
      • View address book contact search pages
      • View an ABPerson instance
      • View contact with any tag
    7. Click Update to add the new permissions to the role.
  9. Assign the role to one or more users. You have a list of users if you loaded sample data, as described at Load sample data for ContactManager.
    1. In the sidebar, navigate to Users & Security > Roles.
    2. On the Roles screen, click ABPerson Manager.
    3. Click the Users tab and click Edit, and then click Add.
    4. On the Search Users screen, enter S in the Last Name field and click Search.
    5. If you have the sample data loaded, Steve Smith is one of the Search Results. Click click Select next to the name.
    6. Click Update to add Steve Smith to the ABPerson Manager role.

      With the ABPerson Manager role, Steve Smith now has permission to create, edit, delete, and view a person or any ABPerson subtype. In addition, Steve has permission to create, edit, delete, or view a contact with any tag. These permissions are required for Steve to be able to use the menus, screens, and widgets associated with creating, editing, or deleting a person.

  10. Log in as ssmith with password gw and test to see if this user can create a new ABPerson or ABPerson subtype and edit and delete contacts of these types. Also, verify that searching for contacts shows only ABPerson or ABPerson subtypes.