Hide Buttons for People with a Specific Role

To let some benefits administrators only view a page, you can hide the buttons from them. You can also hide the buttons on some section headers of a page and leave them on other section headers.

Before you start

  1. Create a custom job role.
  2. Create a data role for the new job role.
  3. Attach the new data role to the person you'll be signing in as.
  4. Sign in as the person with the new data role.
  5. Create a Sandbox and Make It Active

Here's what to do

  1. Go to Navigator > Configuration > Sandboxes.
  2. Enter your sandbox.
  3. Go to and open the page with the buttons you want to hide. For example, you go to the Benefits Summary page to hide the +Add button on the Potential Life Events section.
  4. On the Settings and Actions menu, click Edit Pages.
  5. Confirm that the edit page header has Edit Layer: Site - SITE.
  6. On the View menu, select Source.
  7. Hide a button.
    1. On the Structure tab, click the button you want to hide, such as the +Add button on the Potential Life Events section header.
    2. On the Confirm Shared Component Edit dialog box, click Edit.
    3. On the Source pane toolbar, click the Show the properties of... icon, such as Show the properties of Add.
    4. On the Component Properties dialog box, in the Show Component field, select Expression Builder.
    5. On the Expression Editor dialog box, in the Type a value or expression field, append the expression to hide the button from people with the specified role. Here's the expression that hides the button from people with the SS_BEN_BENEFITS_ADMINISTRATOR_JOB role.
       !securityContext.userInRole['SS_BEN_BENEFITS_ADMINISTRATOR_JOB']

      Here's an example of what the complete expression would be to hide the +Add button on the Potential Life Events section header of the Benefits Summary page:

      #{bindings.BenefitRelSystemCd=='BEN_OAB' and | !securityContext.userInRole['SS_BEN_BENEFITS_ADMINISTRATOR_JOB']
    6. Click OK.
    7. On the Component Properties dialog box, click Apply.
    8. Click OK.
  8. Optionally remove extra space under the section header that you removed the button from, for the same set of benefits administrators.
    1. On the Structure tab, click the space you want to hide, such as the space below the Potential Life Events section header on the Benefits Summary page.
    2. On the Confirm Shared Component Edit dialog box, click Edit.
    3. On the Source pane toolbar, click the Show the properties of... icon, such as Show the properties of toolbar.
    4. On the Component Properties dialog box, in the Show Component field, select Expression Builder.
    5. On the Expression Editor dialog box, in the Type a value or expression field, append the same expression you used to hide the button.
    6. Click OK.
    7. On the Component Properties dialog box, click Apply.
    8. Click OK.
  9. Optionally remove the line separator below the section header that you removed the button from, for the same set of benefits administrators.
    1. On the Structure tab, click the line separator you want to hide, such as the line below the Potential Life Events section header on the Benefits Summary page.
    2. On the Confirm Shared Component Edit dialog box, click Edit.
    3. On the Source pane toolbar, click the Show the properties of... icon, such as Show the properties of separator.
    4. On the Component Properties dialog box, in the Show Component field, select Expression Builder.
    5. On the Expression Editor dialog box, in the Type a value or expression field, append the same expression you used to hide the button.
    6. Click OK.
    7. On the Component Properties dialog box, click Apply.
    8. Click OK.
  10. To render your changes, on the page, click Close.
  11. To verify your changes, on the Sandbox Mode: Edit menu, select Preview as if Published (Context: All).
  12. To publish your changes, on the <YourSandboxName> menu, select Publish.