Setting Block Permissions via PHP

Permalink
Is there any way to set permissions in the actual PHP file of my theme?

 
Mnkras replied on at Permalink Reply
Mnkras
Not really,
rrcustom replied on at Permalink Reply
I know you can set the permissions from the UI by clicking on the editable block and selecting permissions.

I just want a user group to be able to edit and publish on each of those fields without having to do it through the UI (30+ fields is alot of clicks).

There has to be a way to do it via PHP...

This is the only API about permissions I could find here on the website.
http://www.concrete5.org/documentation/developers/permissions/conte...
Mnkras replied on at Permalink Reply
Mnkras
Not in your theme, you can set permissions via php, but not in the theme
rrcustom replied on at Permalink Reply
Not in default.php? Please elaborate.

Couldn't I set the permissions using this?


$block = Block::getByID($blockID, $page, 'Main');
$p = new Permissions($block);
rrcustom replied on at Permalink Reply
Ultimately I'd prefer to have a global block permission file. Can that be done?

Only thing I could find in a search was this post... and it's from 2010

http://www.concrete5.org/community/forums/customizing_c5/set-global...