Reputation: 27
I'm looking for a way in Wagtail 1.8 to give a specific user edit and preview permissions on a specific page once it's created, so I can create the first version of a document for them and then they can add content, tweak, and preview until they're happy with it. One way to do that would have been to assign ownership of the page to them, but that field is read-only. Error is
django.core.exceptions.FieldError: 'owner' cannot be specified
for ArticlePage model form as it is a non-editable field
I can give the user edit and preview permissions for all documents by assigning them to an appropriate Group (e.g., the predefined Editor
role) with the right permissions, but I'd rather avoid that if I can.
Upvotes: 1
Views: 365
Reputation: 15104
This can be accomplished using the stock wagtail permissions (http://docs.wagtail.io/en/v1.8/topics/permissions.html):
Just assign the user to a group of his own (so you need to create a new group) and then give edit permissions to that group for the page you mention. The permissions will propagate down the tree but since there are no children on that page it won't matter. Or you can explicitly don't allow the page to be edited to have children by setting subpage_types = []
to your custom page model.
Upvotes: 1