Restricting access to a PolicyCenter screen by environment

Guidewire uses PCF (Page Configuration Format) files to render PolicyCenter screens. Properties associated with each PCF screen determine whether it is possible to visit, or edit, the screen.

It is possible to restrict access to a screen based on server environment. For example, an administrator can usually access an Activity Patterns screen. This screen provides a list of all of the activity patterns available in PolicyCenter. Clicking one of the listed activity patterns opens that pattern's detail screen.

Suppose, for some reason, that you want to restrict access to the Activity Patterns Detail screen on a production system. Opening up ActivityPatternDetails.pcf in Studio shows the following properties:
  • canEdit
  • canVisit
To permit access to the Activity Patterns Detail screen on a production system only, enter the following value for the canVisit property:
  • gw.api.system.server.ServerUtil.getEnv() == "PROD"

The canVisit property must evaluate to true for the Activity Patterns Detail screen to be accessible to a PolicyCenter administrative user. If the server is in development or test mode, the expression evaluates to false and PolicyCenter restricts access to the screen.