Editors without publish permission can easily change images on live pages.
See original GitHub issueIssue Summary
Editors without publish permission can easily change images on live pages.
Steps to Reproduce
- Suppose we have a page defined like this:
class SamplePage(Page):
image = models.ForeignKey(
'wagtailimages.Image',
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name='+'
)
content_panels = Page.content_panels + [
ImageChooserPanel('image')
]
- As an administrator, create a new group with permission to add (without publish) pages in a particular directory.
- Also, give this created group, the permission to add images.
- Create a new user in that group.
- Login as the created user and upload an image and create a SamplePage and submit it for moderation.
- As an administrator, approve it and publish the new SamplePage.
- Login as the created user again, Now you can easily change the image on the live SamplePage !!! And no moderator can prevent you to do that !!! In other words, you can ruin the whole page when it is live.
This is a real bug I think. Because, as an administrator, I don’t want people without publish permission, to be able to change the live pages whenever they want.
Issue Analytics
- State:
- Created 3 years ago
- Comments:22 (12 by maintainers)
Top Results From Across the Web
What Permissions do Editors Have in WordPress?
They can publish, edit and delete any content on your site. However, they are normally not allowed to change any settings on your...
Read more >Edit video details, options, and permissions in Microsoft ...
Video details, options, and permissions can be edited by people who have owner permissions for the video, and by Stream (Classic) admins.
Read more >How to Allow Editors to Only Edit Certain Pages in WordPress
You need to uncheck the 'Edit Others' and 'Delete others' option for pages. Unchecking these options will stop editors from editing or deleting ......
Read more >Collaborate on documents in Pages, Numbers, and Keynote ...
To set permissions for who can view, edit, and invite others to collaborate on your document, click or tap the pop-up menu below...
Read more >Publishing | Meta Business Help Center
Log into Facebook, then click your profile photo in the top right. Click See all Profiles, then select the Page you want to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks a lot for sharing your concerns. @ababic
You are completely right about the importance of being able to manage media centrally. It has to remain in wagtail.
But I beileve giving developers the ability to use a new way of managing media for some of their images/documents/… fields, makes wagtail really powerful.
I want to have a complete CMS in which a lot of editors (unknown people who moderators might not trust) could create content. I don’t want any of the editors to put some image on a live web page without moderators approval.
I think answering to these questions is really hard (even if I would have understood them correctly). As you’ve mentioned, keeping versions of images/documents/… is really hard and complex. I have discussed a much simpler approach in this issue which doesn’t require keeping versions.
I do believe supporting the current way of managing media is really important. Wagtail should support the current way as well as a new way of referencing images/documents/… from pages.
I’m not really sure. But it has to be scoped to pages. I would suggest using some intermediate class type like
Orderable
s.It would be a great honour if I could create such a third-party app for wagtail. But I don’t know when that would be possible for me, so don’t count on me.
Thank you for the thorough reply @HsnVahedi.
Here’s a solution that might work… Like we have a ‘lock’ mechanism for pages to prevent editing, we could technically do the same for images and documents, and lock/unlock permission could be given only to moderators.
With this in place, you could probably utilise existing hooks to identify and lock the relevant images at the time a page is published (depending on the owner). OR you could maybe specify at a collection-level whether media uploaded to that collection should be locked automatically when uploading media to them.
What do you think?