Skip to content
This repository was archived by the owner on Sep 2, 2021. It is now read-only.
This repository was archived by the owner on Sep 2, 2021. It is now read-only.

Prevent users from changing translations if they lack the capabilities for the remote blog #116

@Biont

Description

@Biont

Writers/Translators of a site may (and will) be spread out across multiple countries.
Right now, as long as a user can 'edit_posts' on his own site, he can also change the content of any other translation of that post.

This can lead to accidental deletions and confusion. And of course, a user simply should not be able edit a post's contents when he actually lacks the capabilities to do so.

The easy solution would be to simply not add the translation metaboxes in the first place, which can be done by adding a check for current_user_can_for_blog( $blog_id, 'edit_posts' ) to Mlp_Translation_Metabox ::register_meta_boxes()

I am not aware of the implications that this change would have on post saving & syncing, but everything seemed to work after a quick test with an editor/subscriber setup and 2 languages.

Is there a reason why this is not the default behaviour?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions