Add a new user permission "Translate own nodes"
hellolindsay - April 30, 2008 - 15:54
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | translation.module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
There is currently only one assignable user permission for i8ns Translation module: "Translate nodes". Giving a user this permission makes the "Translation" tab appear for all translatable nodes. I would like to request the addition of a "Translate own nodes" permission which causes the "Translation" tab to show up only for those nodes owned by the user.

#1
In Drupal 6 it was easy, although I needed to change the core files. Here's the patch for it. There will "translate own content" - access right item at the admin side.
#2
Moving to correct project, Drupal core.
#3
Attached is a D7 implementation of the patch from comment #1.
#4
Looks good, but we may need a unit test case for this permission...
#5
Agreed with #4. Let's make sure we add some tests for this, and related functionality. Thanks!
#6
Attached is a simple addition to the existing translation test. A new user is created and an attempt is made to translate a node which has not been created by that user.
Please let me know if a bigger test needs to be created or something else has to be added.
#7
We should probably check for a 200 when they translate a node they do have permission to translate as well. Otherwise looks good.