Hiding Blocks from Add Blocks BlockList
PermalinkI'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.
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.