Advanced export options for non-global administrators.

   —   
This article describes how to allow a non-global admin to access advanced data export functionality.
The UI data export functionality allows you to export data shown in various listings throughout the whole Kentico UI.  Using this functionality, you can export data to XLSX, CSV or XML files. The  export functionality is accessible in a context menu after clicking the downward facing arrow in the Actions column header.  When the Advanced export option is selected by a standard user who is not a global administrator, a simplified dialog that offers fewer options is displayed for these users. 
 
In order to display the same options to both standard users and global administrators, you need to modify the ~\CMSAdminControls\UI\UniGrid\Controls\AdvancedExport.ascx.cs file starting around line 655.  You should see the following code:
 
plcWhere.Visible = CMSContext.CurrentUser.IsGlobalAdministrator;
plcExportRawData.Visible = CMSContext.CurrentUser.IsGlobalAdministrator;
orderByElem.Visible = !CMSContext.CurrentUser.IsGlobalAdministrator;
txtOrderBy.Visible = CMSContext.CurrentUser.IsGlobalAdministrator;
lnkDefaultSelection.Visible = CMSContext.CurrentUser.IsGlobalAdministrator;

 
To allow the advanced export, you need to place an exclamation mark in front of each item you want to allow a non-global admin to modify.  The example below would allow the same options for all CMS Users:
 
plcWhere.Visible = !CMSContext.CurrentUser.IsGlobalAdministrator;
plcExportRawData.Visible = !CMSContext.CurrentUser.IsGlobalAdministrator;
orderByElem.Visible = !CMSContext.CurrentUser.IsGlobalAdministrator;
txtOrderBy.Visible = !CMSContext.CurrentUser.IsGlobalAdministrator;
lnkDefaultSelection.Visible = !CMSContext.CurrentUser.IsGlobalAdministrator;

 
Advanced export for non-global admin before changes.


Advanced export for non-global admin after changes.

-EH-


See also:

Applies to: Kentico CMS version 7.x
Share this article on   LinkedIn