User permissions determine which elements on the EUI are visible to . Oftentimes, you may have several groups of users, and you want the different groups to see different elements on the interface. In other cases, you may want the same user to see different parts of a record based on the the page they're viewing. For example, . In either case, understanding how permissions control visibility in the EUI can help you create an interface that suits your needs.
Before making changes to the EUI, we recommend that you have a basic understanding of the following topics: For more information on HTML and CSS, visit W3 Schools. |
Controlling Visibility
The interface that a user sees depends on two factors:
- Their group permissions.
- The status of a table or menu tab in the
translation.properties
file. Tables and menu tabs can be if their value is No. If a table or menu tab is not turned on, end users will not see it, regardless of their .
To illustrate this, the three images below show the home page contents for three different users: one in the Admin group, one in the Document Creator group, and one in the Customer group. Each user sees a different interface based on their permissions. Notice that not even the user in the Admin group sees the Change Requests or Tasks tables, which are turned off in these examples.
A user in the Admin group sees six tables and sets of links:
A user in the Document Creator group sees four tables and sets of links:
A user in the Customer group sees two tables and sets of links:
Control Visibility with Permissions
When users log in, the system checks their group permissions and uses the $ewPermission.table
method to determine which EUI elements they see. This method requires two parameters, the logical table name and the permission type, which take the form $ewPermission.table("table","permission")
. For example, $ewPermission.table("case","view_own")
returns “true” if the currently logged in user user has permission to view their own records in the Support Cases table.
The logical table name might be different from the table name that's displayed. To find the logical table name, open the Table wizard for the desired table and check the General tab. |
You can insert the $ewPermission.table
method in a conditional that surrounds an element, such as a link or menu item. Conditionals are used throughout the records in the EUI Templates table to dynamically control element visibility based on group permissions. For example, consider the following conditional:
#if ($ewPermission.table("case","view_own"))
<li><a href='#ew_forward("my_supportcases.html")'>$ewText.get('menu.view.mysc')</a></li>
#end |
If the user has permission to view their own records in the Support Cases table, the system shows the user a menu item to view a page containing support cases that they own.
To control which permissions control the display of an element:
- In the EUI Templates table, open the desired template file.
Find the method that relates to the relevant table and element.
- Edit the permission in the second parameter, or add a logical operator to expand the conditional. For a complete list of permission types, see Permission Parameters below. For more information on conditionals and the available logical operators, see Macros, Methods, and Conditionals.
- Click Save.
- View the EUI page with the relevant user to verify that the element visibility is working as intended.
Control Visibility with translation.properties
The translation.properties
file in the EUI Templates table controls the global visibility for tables and menu tabs by turning on or turning off specific tables and tabs. For users to see a table or menu tab in the EUI, it must be turned on in translation.properties
. To prevent all users from seeing a table or menu tab, you can turn it off.
Th translation.properties file has alternate versions for other languages, which allow for a multilingual environment. If your KB is available in multiple languages, be sure to update the keys in each translation file when making changes. For more information on localization and the EUI, see Text and Localization in the EUI. |
Table visibility is controlled near the , and menu tab visibility is controlled just below the table visibility section. If the show.[t] key is set to Yes for a given table or tab, then it's included in the interface for those users with permission to view it. If show.[item] is set to No, it's not shown on the home page or navigation menu to any users, regardless of their permissions.
To control global :
- In the EUI Templates table, open
translation.properties
. - Set the relevant table and menu tab keys to Yes or No.
- Click Save.
- If other languages are in use, open any other versions of
translation.properties
and repeat the process. - View the EUI to confirm that changes have taken effect.
Keep in mind that whether a user can actually view a table or the items within a tab still depends on the user’s group permissions.
Permission Parameters
The table below lists the permission-based parameters for use with the $ewPermission.table
method. Each of these values corresponds to a permission setting in the Table Permissions wizard.
Permission Type | Description |
---|
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 |
The table below lists the complete list of permission-based parameters.
Permission Type | Description |
---|
Record Permissions | create | Allow user to create a new record | delete_own | Allow user to delete own records | delete_others | Allow user to delete others’ records | mass_delete | Allow user to delete multiple records | dele_oth_if_pub_y | Delete others’ records if published field is yes | massedit | Allow user to perform mass edit | import_multiple | Allows import of multiple records from a file | export_multiple | Allows export of multiple records to a file | link_multiple_recs | Link multiple records using the Link menu | print_recs | Print records using the printer icon | View and Edit Permissions | view_own | Allow user to view own records | view_others | Allow user to view others’ records | view_own_if_pub_y | View own records if published field is yes. | view_oth_if_pub_y | View others’ records if published field is yes. | edit_own | Allow user to edit own records | edit_others | Allow user to edit others’ records | Saved Search Permissions | mod_own_s_searches | Allow user to modify/delete saved searches that they created | mod_all_s_searches | Allow user to modify/delete all saved searches | mod_own_s_views | Allow user to modify/delete saved views that they created | mod_all_s_views | Allow user to modify/delete all saved views | mod_own_s_reports | Allow user to modify/delete saved reports that they created | mod_all_s_reports | Allow user to modify/delete all saved reports | pub_s_reports | Allow user to publish saved reports | v_own_with_ssearch | View own entries that satisfy the saved search | v_oth_with_ssearch | View others’ entries that satisfy the saved search | e_own_with_ssearch | Edit own entries that satisfy the saved search | e_oth_with_ssearch | Edit others’ entries that satisfy the saved search | d_oth_with_ssearch | others’ entries that satisfy the saved search | acc_oth_ss | Allow access to others’ saved searches | acc_oth_ss_py | Allow access to others’ saved searches if Published=Yes | FAQ Permissions | view_faq | Allow user to view FAQs | view_faq_with_ss | View FAQs that satisfy the saved search | Table Permissions | ed_rec_tab_view | Edit records from table view | omit_table_label | Allow user to set show label on view/editing on General tab | copy_recs | Copy $table-label-plural | show_in_main_tabs | Allow user to see it in main tabs | allow_sel_ed_flds | Allow user to select editable fields in view they can edit | apply_to_subtabls | Apply changes to subtables (in groups wizard) | apply_all_to_subtabls | Apply everything to subtables (in groups wizard) | Custom Report Permissions | create_calendar | Create calendar records on specific subtype | c_cal_with_ssearch | Create calendars on records that satisfy the saved search | view_own_calendar | View own calendar entries | v_own_cal_with_ssearch | View own entries that satisfy the saved search | view_others_calendar | View other peoples’ calendar entries | others_cal_with_ssearch | View other peoples’ entries that satisfy the saved search | edit_own_calendar | Edit own calendar entries | e_own_cal_with_ssearch | Edit own entries that satisfy the saved search | edit_others_calendar | Edit other peoples’ calendar entries | e_others_cal_with_ssearch | Edit other peoples’ entries that satisfy the saved search | delete_own_calendar | Delete own calendar entries | d_own_cal_with_ssearch | Delete own entries that satisfy the saved search | delete_others_calendar | Delete other peoples’ calendar entries | d_others_cal_with_ssearch | Delete other peoples’ entries that satisfy the saved search | Email Permissions | view_comm_from | View outgoing email address FROM | edit_comm_from | Edit outgoing email address FROM | view_comm_replyto | View send-back email address REPLY-TO | edit_comm_replyto | Edit send-back email address REPLY-TO | create_comm | Create a communication record linked to the given subtype | Email Template Permissions | mod_own_eml_tmpl | Allow users to modify/delete own email templates | mod_all_eml_tmpl | Allow users to modify/delete all email templates | viewsend_own_eml_tmpl | Allow viewing/sending only their own email templates | viewsend_ownpublished_eml_tmpl | Allow viewing/sending own and published email templates | viewsend_ownpublished_eml_tmpl | Allow viewing/sending own and published email templates | viewsend_all_eml_tmpl | Allow viewing/sending of all email templates | publish_eml_tmpl | Allow user to publish email templates | Print Template Permissions | cr_mod_own_ptmpl | Create/modify own print templates | cr_mod_all_ptmpl | Create/modify all print templates | use_all_ptmpl | Use all print templates | use_ownpub_ptmpl | Use/own/publish print templates | can_pub_ptmpl | User can publish print templates |
|
Related articles |