Your software
My Mautic version is:3
My PHP version is: 7.2.33
Your problem
My problem is: I want to be able to hide the calendar. I am setting up a client role and want to hide certain aspects. Role permissions do not cover calendar. And then users can see other users scheduled and upcoming emails. Alternatively, if anyone knows how to solve that issue so a user only sees their own calendar entries.
@robm I have been trying to do this, also. Iâm unclear what the point of the calendar even is as it seems to show a massive amount of âsystem eventsâ that are not particularly useful to a marketer. I am currently trying to hide it via css, so far unsuccessfully. If I figure it out, Iâll post it back here.
Hiding unwanted features, and changing labels for others would be huge.
Now, open app/bundles/CoreBundle/Views/Default/head.html.php and put this just before the closing tag:
<script src="/media/js/myscript.js"></script>
You are just calling a script from the âheadâ code that waits until the HTML of the page is loaded and then identifies the HTML element by its ID and sets a css style of display:none;
One edit on instructions. If you name the js script âmyscript.jsâ then use that name in the head.html file script addition. ie replace âheadstartâ with whatever you named your file.
Hi @mikew - sorry for the long delay. Have you figured out a way to do this? Off of the top of my head, it seems difficult because you would need to tap into however Mautic authorizes roles and access and then utilize that in the javascript script to hide/show bases on the authorization. I have no idea how to do that! This was more of a âbroad strokeâ approach that just kills the calendar for everyone.
One way is to write a custom code and hide it. Here are the pointers to do so,
Listen to the event CoreEvents::BUILD_MENU in your custom plugin
And add this $bundles['MauticCalendarBundle']['config']['menu']['main']['items'] = []; to the method. Or $bundles['MauticCalendarBundle']['config']['menu']['main']['items']['mautic.calendar.menu.index']['access'] = '<your-permission-name>';