Composer - Edit Mode
Permalink 1 user found helpful
Have given permission for Registered Users to create a page type in composer however I don't want the Edit Mode button to be available to them. Is this something I can control using permissions or do I have to remove in the code ?
Is this code for 5.7? I have tried adding it via a PHP block on a page and it returns with the following error on page load:
Am I adding the code via the wrong method (do I need to hard-code it somewhere?) or is this meant for use on 5.6?
Cheers!
Unable to get permission key for write
Am I adding the code via the wrong method (do I need to hard-code it somewhere?) or is this meant for use on 5.6?
Cheers!
First, we want to check to see if the user logging is admin.
If yes, no change. (Note: I left a dummy line of CSS in the script for visual purposes. You can delete it)
Then we want to check if the user is logged in under any privilege.
If true, then we add CSS to hide the toolbar and remove the gap it leaves.
With this code. Any user that logs in as Admin/SuperUser will be able to see the toolbar and edit. It will be hidden from those without the right permissions.