Turn off Design for a user group
Permalink 1 user found helpful
I've been watching the videos for "permissions" and advanced permissions but I can't seem to figure out how to turn off specific content block capabilities, specifically:
Design
Is there a way to turn this off for a given role?
I only see:
Read
Write
Approve
Delete
Admin
I've set in my config:
define('PERMISSIONS_MODEL', 'advanced');
Design
Is there a way to turn this off for a given role?
I only see:
Read
Write
Approve
Delete
Admin
I've set in my config:
define('PERMISSIONS_MODEL', 'advanced');
This works well for me.
Thanks
Thanks
Depending how techy you want to get there is a file that you can create called /config/site_process.php
AFAIK you should be able to put this
site_process.php runs before the page is rendered.
AFAIK you should be able to put this
$user = new User(); $group = Group::getByName('Awful Designers'); if($user->inGroup($group)) { define('ENABLE_CUSTOM_DESIGN', false); }
site_process.php runs before the page is rendered.
Haha funny (but true).
Does this slow down the site very much? I think not because it seems like a simple check but I thought I should ask.
Does this slow down the site very much? I think not because it seems like a simple check but I thought I should ask.
No, not really.
idk. Good question. Although I just realized you would be exposing some more global variables I think so maybe wrap it up in a
I'm not sure the best way to do closures in php in but something like that.
$site_process = function() { $user = new User(); $group = Group::getByName('Awful Designers'); if($user->inGroup($group)) { define('ENABLE_CUSTOM_DESIGN', false); } }; $site_process();
I'm not sure the best way to do closures in php in but something like that.
Good info... But is there a way that you can do it to a specific block area? My example is I have a Header Nav area, I don't want the client to be able to play with design on this area, but I don't mind them using it on other areas? Cheers ;)
You _can_ disable design at a site-wide level by adding
to your config/site.php and that will remove "Design" as an option globally.