UCP User Templates

This feature is supported only for PBX 15+ Systems

Introduction

Starting in UCP 14, the first time a user logs into UCP they see a blank page with a link to a tutorial. They must create a tab (tab=dashboard) and add widgets one by one in order to have a usable UCP experience. Each user needs to create their own UCP layout from scratch which, while not difficult, may be more work than expected for new users.

Starting in UCP version 15, a UCP Template feature has been introduced to allow PBX administrators to create UCP templates that can be applied to existing UCP user accounts, or automatically applied to new users when they are created. Once a template has been set up and added to a group, whenever a new user is created in that group, their UCP experience will match the template.  When the user logs in for the first time they see the default widget layout, which they are then free to modify, add and remove as they wish.

UCP Templates 

Default Template 

Each new install of the ucp/userman module will by default create a "<brand>-template" with tabs showing CDR and Voicemail widgets. The PBX administrator is free to use this default template as-is, they can modify the default template to better suit their needs, or can ignore it and create their own templates.

This default template is for reference. If it's not required it can be deleted safely.

To see the UCP templates, browse to Admin → User management → UCP Templates tab

 

How to Add a UCP Template

To create a new template, browse to User management→ UCP Templates tab and click the Add button.

When adding a new template, there two ways:

Import From Existing User

We can use any existing user's existing UCP configuration to create a new "UCP template".

" Add Template → Import from a User "  → dropdown list will display the list of available users to choose from. 

 

Using Template Creator account

There is a Default user called 'FreePBXUCPTemplateCreator' which is auto generated on module install that is associated with a Virtual extension (FreePBXUCPTemplateCreator).
We can import the template from FreePBXUCPTemplateCreator user as well.

Once you have added the template the new/update template will be highlighted.

 

 

How to modify UCP template 

To edit an existing UCP template, browse to User Manager → UCP Templates tab and see the list of available templates on the system.

The "View" action will directly redirect us to UCP login page with the available widgets for the associated template.

Here you can add additional dashboards (tabs) and widgets for this template.
Once you are finished editing, note the Button   at the bottom left corner. Click this button to save this template.

Please note that the "save" option is only available for UCP template login, not for normal UCP users.

Please do not forget to Logout , once you are done with your UCP template configuration.

 

 

 

 

Once you update/save the template settings , the UCP template list will highlight those templates which are in need of being rebuilt.

FreePBXUCPTemplateCreator User 

To view/edit the UCP Template we need FreePBXUCPTemplateCreator.

Create Generic Template User 

On the GUI we have the option to create the FreePBXUCPTemplateCreator user, which comes under Userman → UCP Templates.

 

When you click on this Create Generic Template button, it will create Userman user and a Virtual Extension to associate with this created user.

Deleting Generic Template User 

Clicking on the Delete Generic Template button, will delete the FreePBXUCPTemplateCreator User and its associated virtual extension.

 

There is also a fwconsle command to delete the FreePBXUCPTemplateCreator 

fwconsole command

fwconsole userman --deletegenerictemplate

 

How to assign the template to users/groups

There are two ways you can associate the template to a user:

  1. Group Level    :   Group → UCP→ General 
    Assign UCP Template → Whether the group users can use the templates (yes /no)
    Template List  →  If the Assign UCP Template option is Yes  then the List of template will be listed here, you can assign one template list

     

     

  2. User Level  : User → UCP→ General
    Assign UCP Template → Whether the user can use the templates (yes /no/inherit), if you select Inherit then template will be used from group
    Template List  →  If the Assign UCP Template option is Yes  then the List of template will be listed here, you can assign one template list

     

     

 

 

How to associate template to a new user

By default, "Assign Template" permission is set to "Inherit" for every newly created user, which means user will take the UCP template configuration from his parent group configuration (if configured/enabled).

How template works for existing users

You can associate a UCP Template either at the group or the user level. If you wish to apply a template to an already existing user, you may use the Force rebuild widgets button   shown in the action column on the UCP Templates listing page.

When you click on any template   Force Rebuild option, you will be taken to a new page where it will list all the associated users of the template on left side. Choose which user(s) (one or more) you wish to rebuild by dragging each user to the area on the right and clicking the desired button at the bottom right to rebuild.

 

 

The "Rebuild Widgets" button option

The Rebuild Widgets option will clear all of the user's existing UCP dashboard, widgets and sidebar and replace it with the layout from the UCP template.

The "Merge With Existing Widgets" option

This option allows the PBX admin to update the user's UCP panel display by preserving their own dashboard and sidebar settings and also add the additional UCP settings from Template.

Reset Option on Users UCP panel 

When a user is logged into User Control Panel, they will see a Reset button at the lower left. This Option allows user to permanently reset their panel widgets and tabs to their assigned template settings. Once you click on the reset button, the UCP will ask for confirmation by entering the word "reset".

 

Template and users permissions

When an Admin creates a UCP template, the widgets and the sidebar are displayed based on the FreePBXUCPTemplateCreator user's permission. If any of the widgets are not showing while Creating/Modifying the template, then please check the User 'FreePBXUCPTemplateCreator ' permissions in User Management.

While Rebuild/Merging the template for a user, only the widgets for which the user has permissions will be added to the UCP panel. Any other widgets will be ignored. In order for all widgets from a template to show for a user, it is necessary for the user to have permission for all widgets. You can review the group and user permissions by editing the appropriate group/user in User Management. Changes in user permissions for UCP widgets will not immediately show up in the user's UCP layout, it is necessary to rebuild their UCP layout from the template.

Export/Import of UCP templates 

UCP supports importing and exporting templates using the Bulk Handler module. The exported csv data contains all settings for a single UCP template in JSON format.

UCP Template Export

 

 The exported csv data contains template name , description, template_1_key, template_1_value, template_1_type, etc.

 

The CSV file direct edit is not recommended as the file contains lengthy json strings. Ensure the UCP template is set up as desired before exporting.

UCP Template Import

 

It is expected that the admin will import an unmodified csv file which has been exported using the Bulk Handler module:

 

 

 

Replace existing is done based on the template name, if you have same template name already defined in your list of UCP Templates, then it will be replaced with newly imported data.

 

 

Return to Documentation Home I Return to Sangoma Support