Page tree
Skip to end of metadata
Go to start of metadata

Permissions and Visibility in the EUI

This topic will give some practice examples to control visibility and permissions in the EUI. 

What Controls the Visibility of Elements on Home Pages

What a specific user sees when they log in depends on two things:

  • Whether the user has the right group permissions to see that table or item.
  • Whether a table (e.g., Contracts or Support Cases) is “turned on” in the translation.properties file. If a table is not turned on, then end users will not see it on the home page, no matter what permissions they have.

To illustrate this, the three images below show the home page contents for three different users: one in the Admin group, one in the Internal Customer group, and the last in the Customer group. Each user sees different contents derived from the same home page.

An Admin group member logged into the EUI sees four tables and sets of links:

An Admin group member logged into the EUI sees four tables and sets of links.

A user in the Internal Customer group sees Helpdesk Cases and Document FAQs:

The user in the Customer group sees only Support Cases:

Controlling Visibility with Permissions

When users log in, their detailed group permissions are loaded into the system; whether the user has a certain permission is used to control the visibility of elements in the EUI through use of the $ewPermission.table() user method.

This method requires two parameters, the logical table name and the permission parameter, in the form $ewPermission.table("table","permission").

For example, $ewPermission.table("case","view_own") returns “true” if the logged-in user has permission to view their own records in the Support Cases table.

The $ewPermission.table() method can be inserted in an #if condition surrounding an element such as a link or menu item. These conditions are used throughout the records in the EUI Templates table to dynamically control element visibility and hide options from a user without the permission to complete that action. For example:

#if ($ewPermission.table("case","view_own")

To change what permission is used to control the display of a particular item, edit the $ewPermission.table parameters to the desired permission values. Permission controls can be combined with logical operators such as an “AND” (&&) or an “OR” (||) to further filter and control what is displayed.

Controlling Visibility with translation.properties

The record in the EUI Templates table named translation.properties is where we control table visibility and all custom text shown in the interface.

There are alternate versions of this record for other languages with the same controls (e.g., translation_ru.properties for Russian), but we will focus on the English version here.

If your KB is available in multiple languages, be sure to update the controls in each translation file when making changes.

Table Visibility

Near the top of the Body field are the main visibility controls for tables and whether they are displayed in the EUI, beginning with show.contracts=yes. The default home page code includes the following tables: Helpdesk Cases, Support Cases, Change Requests, Contracts, Documents, Tasks, and Repair Requests. 

If the show.[table] variable is set to “yes” for a given table, then that table is included in the interface for those users with permissions to view it.  If show.[table] equals “no”, then the table will not be shown on the home page or menus to any users, regardless of their permissions. This offers a quick way to turn a table on or off for the EUI.

The top section of each translation.properties file includes variables to control the visibility of tables and menu items:

Menu Item Visibility

Below the table controls is another section to control the visibility of items in the navigational menu bar, beginning with show.menu.new=yes. These variables define whether the New, View, FAQs, and My Profile tabs are visible, as pictured below.

  • show.menu.new=yes makes the New menu tab available. 
  • show.menu.view=yes makes the View menu tab available.
  • show.menu.faqs=yes makes the FAQs menu tab available.
  • show.myprofile=yes makes the My Profile menu tab available.

The FAQ interface is available by default for the Helpdesk Cases, Support Cases, and Documents tables.  We’ve included individual variables for each FAQ, e.g. show.sc.faqs, to provide a quick way to turn these FAQs on or off.

What actually appears in the drop-down under each menu item still depends on the user’s permission to create records, view records, and view FAQs.

Common Permission Parameters

The table below lists common permission-based parameters for use with the $ewPermission.table() method. Each of these corresponds to a permission setting in the Manage Groups wizard.

Parameter

Permission

create

Create records in the table

edit_own

Edit their own records in the table

e_own_with_ssearch

Edit only their own records matching a saved search

delete_own

Delete their own records in the table

view_own

View their own records in the table

v_own_with_ssearch

View only their own records matching a saved search

view_others

View other people’s records in the table

v_oth_with_ssearch

View only others’ records matching a saved search

view_faq

View FAQs from the table

view_faq_with_ss

View only FAQs matching a saved search

  • No labels