I’m having an issue with a custom module.
When logged in as global administrator, the Tools menu in CMS desk allows access to the module as expected.
However, for the non-global admin user in a role with 'read' permissions set for the specific module, access is denied with the UI returning the warning:
"Your UI profile is not granted with permission to access this section"
It appears the check "
IsAuthorizedPerUIElement(CMS.Tools, ToolsDashboardElement)" in the codefile
\CMSModules\Widgets\Controls\Dashboard.ascx.csis causing this access to fail and returning the warning (confirmed by removing the "IsAuthorizedPerUIElement" check shown below - after which access is allowed)
// Check UIProfile
if ((CMSContext.CurrentUser == null) || (!CMSContext.CurrentUser.IsAuthorizedPerUIElement(ResourceName, ElementName)))
{
URLHelper.Redirect(UIHelper.GetInformationUrl("uiprofile.uinotavailable"));
}
(Note - I believe this is the original Kentico code here, hasn't been modified from source).
Can anyone let me know how I can set the Authorization on the specific UI elements so this security check will work for the custom module?