Set global area/block permissions

Permalink
Hi all! This is my first C5 project, and i really like this CMS!

Now, i'm having some problems with area permissions. Let me explain what i need to do. I'm working on a multilanguage website (15+ languages), so basically i have a site tree that is duplicated once for every language, and a total amount of pages equal to 250+.

I think the problem here is that i really have a lot of single pages (8 in each language tree, so about 100 total), but i need they to have almost the same area and block permissions. The client won't add more than text or images in all these pages, so i really need to set them so that is not possible to add other types of blocks to their areas.

How would you handle this? I do know of C5 advanced permissions, but i don't think it's what i need here. I can setup default block types for my site page types, but i can't figure out how i could do the same thing with my single pages.

Any help would be really appreciated. :)

 
Akerfeldt replied on at Permalink Reply
I think i may need to copy the area permissions programatically, but i don't quite understand how i can do this.

I guess it could be something like:
// grab the source page object
$pobj = Page::getByID($myID);
// grab the source area object
$a = Area::get($pobj, 'Pagetext');
// grab the source permission object for that area
$p = new Permissions($a);
// copy permissions into the target permission object
global $c;
$a2 = Area::get($c, 'Pagetext');
$p2 = new Permissions($a2);
$p2->loadPermissionSet($p);


But i guess loadPermissionSet() is not the function i need here. :/