Outgoing Email access for non-admins

6 posts by 2 authors in: Forums > CMS Builder
Last Post: April 26, 2022   (RSS)

By daniel - April 25, 2022

Hi Mikey,

There's currently no built-in way to give non-admins access to that page, though we can keep this in mind for future updates.

A relatively simple temporary solution could be achieved by updating the file /cmsb/lib/menus/_outgoing_mail/actionHandler.php and commenting out lines 7-9 to look like this:

// if (!$GLOBALS['CURRENT_USER']['isAdmin']) {
//   alert(t("You don't have permissions to access this menu."));
//   showInterface('');
// }

This will allow global "Editor" users to access this page, though they won't be able to see it in the menu - they'd need to navigate to it directly or from a custom link. Also, note that this is a core file, so any changes made to it will be overwritten when updating the CMS to a new version.

Let me know if you have any questions!

Thanks,

Daniel
Technical Lead
interactivetools.com

By Mikey - April 25, 2022

Hey Daniel,

I gave that a try, but I get the following message "You don't have permissions to access this menu."

By daniel - April 25, 2022

Hi Mikey,

Just to confirm, are you trying to access it with a user that has their overall Section Access set to "Editor"? This won't work for Author/Viewer users, nor will it work for "By Section" access.

Thanks,
Daniel

Daniel
Technical Lead
interactivetools.com

By Mikey - April 25, 2022

Hey Daniel,

Their accounts are "By Section" access. 

Any other suggestions?

By daniel - April 26, 2022

Hey Mikey,

In order to enable this to work with "By Section" access, you'll need to modify the schema file "/cmsb/data/schema/_outgoing_mail.ini.php"

  1. Change "tableHidden" to 0
  2. Change "menuType" to "multi"

Then visit the "Section Editors" page to have the schema changes take effect. This will allow you to set per-section access to the Outgoing Mail menu item. If you also want the section to show up in the menu, change "menuHidden" to 0 as well.

These changes will make Outgoing Mail behave mostly like a "regular" section, so it will also allow users with View access to see it as well.

And I'll note again that these changes could be overwritten by future CMS upgrades, so if you go this route make sure to thoroughly document the process.

Let me know if you have any other questions!

Thanks,

Daniel
Technical Lead
interactivetools.com