Search code examples
apostrophe-cms

Is there a way to give permissions to parked pages at startup?


I'm using parked pages for my website, right now i'm adding the permissions manually, is there a way to give the permissions at startup?


Solution

  • Currently this is not feasible because you would have to work out the correct value not just for the docPermissions array, but also for all of the schema fields that edit the permissions, and this would require group and user _id values that might not even exist yet at the time the site starts up with the parking configuration in question. Also locking these fields would lock you out of being able to edit the permissions later, even as an admin, which is probably too strict.

    Probably the best way to accommodate this in the future in Apostrophe would be to add new command line tasks for operations such as setting page permissions by slug. These could be scripted along with the existing command line tasks for creating users and groups.