I’ve already written article How to disable upgrade notification in Mautic. Hide settings from configuration is just little step forward.
The all magic is with file security_local.php in app/config/ directory.
We can easily extend our security_local.php. Example for hide two options from Tracking settings:
- Identify visitor by device fingerprint
- Identify visitors by IP options
// hide Identify visitor by device fingerprint and Identify visitors by IP options $myCutomRestrictedConfigFields = ['track_by_fingerprint', 'track_contact_by_ip']; $restrictedConfigFields = array_merge($restrictedConfigFields, $myCutomRestrictedConfigFields); $container->setParameter('mautic.security.restrictedConfigFields', $restrictedConfigFields);
Don’t forget clear cache (app/cache/prod/) and results looks like:
In same way, you can hide any option from configurations. Just inspect the code and find option name in code and let your customers so much cleaner UX.