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

5ven - December 13, 2008 - 08:44

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.

AttachmentSizeStatusTest resultOperations
translate-own-nodes.patch2.28 KBIdleFailed: Failed to apply patch.View details | Re-test

#2

nedjo - December 15, 2008 - 16:46
Project:Internationalization» Drupal
Version:5.x-2.3» 7.x-dev
Component:Miscellaneous» translation.module

Moving to correct project, Drupal core.

#3

j.somers - April 18, 2009 - 13:38
Status:active» needs review

Attached is a D7 implementation of the patch from comment #1.

AttachmentSizeStatusTest resultOperations
jsomers_253157_1.patch2.79 KBIdlePassed: 11571 passes, 0 fails, 0 exceptionsView details | Re-test

#4

Arancaytar - May 20, 2009 - 10:35
Status:needs review» reviewed & tested by the community

Looks good, but we may need a unit test case for this permission...

#5

Dries - May 30, 2009 - 17:39
Status:reviewed & tested by the community» needs work

Agreed with #4. Let's make sure we add some tests for this, and related functionality. Thanks!

#6

j.somers - May 31, 2009 - 10:20
Status:needs work» needs review

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.

AttachmentSizeStatusTest resultOperations
jsomers_253157_2-D7.patch4.12 KBIdlePassed: 11823 passes, 0 fails, 0 exceptionsView details | Re-test

#7

catch - June 1, 2009 - 22:25
Status:needs review» needs work

We should probably check for a 200 when they translate a node they do have permission to translate as well. Otherwise looks good.

 
 

Drupal is a registered trademark of Dries Buytaert.