I have a group which asks for a content type in which I should allow a user to add and publish a page, but disable any changes. Basically after publication the published page should be 'read only'. Is there a way to achieve this with the permission tools in wagtail?
I have a LabPage and I have registered the permissions to be reflected in the groups display:
wagtail_hooks.py
@hooks.register('register_permissions')
def register_labpage_permissions():
return Permission.objects.filter(
content_type__app_label='my_app',
codename__in=['add_labpage', 'change_labpage', 'delete_labpage']
)
I have set only the "add" permissions for LabPage. "change" and "delete" are unset:
But my LabPage is contained in the site and the permissions are overridden by the general site Page Permissions:
My question is how do I allow the member of this specific group to have the default permissions for the site, but in the particular case of the LabPage to be able to ADD and PUBLISH, but not to EDIT or DELETE?
A more generic question would be: How do I set permissions per content type only (ex: LabPage) for a specific group, without them being overridden by parent group settings? How could this be achieved with wagtail hooks?



