Hiding Blocks from Add Blocks BlockList
Permalink
Hi,
I'm relatively new to developing c5 and I have the following situation.
-I would like add to the existing permissions model the ability to allow/disallow users to add blocks of a certain type. i.e. If I only want a group called "flash_contributer" to be able to add the "Flash Content" block and have that block not be listed to other users/groups.
I've taken a look at what i think might be the appropriate files but I just wanted to know if i'm heading in the right direction before i start coding. I want to role out this capability in the short term by editing the permissions.php file (specifically the populateAllBlockTypes() function) to check if the user has a group or is admin... But this is a very bad way to do it, i know.
I want to add another button in the "Add Functionality" blockList to deal with permissions of the add-ons, and then edit the permissions system accordingly to deal with this. Any tips/suggestions before I embark on this? Once I get a working bit of code I'll post it.
side notes:
advanced permissions is active.
I'm relatively new to developing c5 and I have the following situation.
-I would like add to the existing permissions model the ability to allow/disallow users to add blocks of a certain type. i.e. If I only want a group called "flash_contributer" to be able to add the "Flash Content" block and have that block not be listed to other users/groups.
I've taken a look at what i think might be the appropriate files but I just wanted to know if i'm heading in the right direction before i start coding. I want to role out this capability in the short term by editing the permissions.php file (specifically the populateAllBlockTypes() function) to check if the user has a group or is admin... But this is a very bad way to do it, i know.
I want to add another button in the "Add Functionality" blockList to deal with permissions of the add-ons, and then edit the permissions system accordingly to deal with this. Any tips/suggestions before I embark on this? Once I get a working bit of code I'll post it.
side notes:
advanced permissions is active.
if you've got advanced permissions turned on, then you can already do this at an area's level. edit an area's permissions and you'll see checkboxes for each block type. you could set the permissions on the page type defaults and root pages to make sure child pages inherit those same permissions.
ah, yes, well that is what i wanted. I was was unaware of that functionality. Thanks!
The first thing I'm going to do is kludge the permissions.php file to do what i need. Then when I'm not under such a deadline i'm going to attempt to do it properly by adding the functionality to the dashboard.