Permissions
Permalink
Is it possible.. programatically (using PHP) set page, area or block permissions for an individual user and/or group. I have advanced permissions enabled.
Im my App the user fills out a form... my App then creates a new page with core content generated from the information in the form. I am able to create a new page and add specific blocks to specific areas with specified content & settings. what I now want to do is limit access to that page to the superAdmins group only until it's approved.
Is it possible to use the Permissions class to do this as I can't see any way to set permissions in PHP?
Im my App the user fills out a form... my App then creates a new page with core content generated from the information in the form. I am able to create a new page and add specific blocks to specific areas with specified content & settings. what I now want to do is limit access to that page to the superAdmins group only until it's approved.
Is it possible to use the Permissions class to do this as I can't see any way to set permissions in PHP?
Sounds similar to one of my projects. Well, in the controller, once the page has been programmatically added add the following code:
At this point you inform the superadmin / admin of the newly inserted page (via email). Admin can then, through sitemap interface, set new permissions for that specific page.
Not sure if you solved this problem already but I'm replying in case someone else comes across this thread with the same needs.
http://www.concrete5.org/community/forums/customizing_c5/programmat...
Cheers