Rename the permission

dagmar - February 2, 2008 - 13:10
Project:Comment CCK
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:cwgordon7
Status:closed
Description

Hello:

Can you add another permission in the implementation of hook_perm()?

Something like this

<?php
/**
* Implementation of hook_perm().
*/
function comment_cck_perm() {
  return array(
'allow fields to be changed', 'use comment cck',);
}

/**
* Implementation of hook_comment()
*/
function comment_cck_comment($comment, $op) {
  if(
user_access('use comment cck')){
    
//your comment_cck_comment function code
 
}
}
?>

Then we can set wich roles can use comment cck

Thanks
Mariano

#1

trish t - April 2, 2008 - 13:58

+1 for this

#2

sinasalek - May 14, 2008 - 17:12

Same here

#3

killes@www.drop.org - June 1, 2008 - 18:54
Status:active» active (needs more info)

I am not sure I understand this request: The permission that is implemented does a check in hook_:form_alter already.

#4

cwgordon7 - July 12, 2008 - 04:38
Title:More permissions» Rename the permission

I agree that this makes no sense. However, I think that this request comes from a misunderstanding of the very unclear "allow fields to be changed" permission name. Perhaps it should be renamed to something along the lines of "alter cck fields through comments".

#5

cwgordon7 - July 12, 2008 - 04:42
Version:5.x-1.x-dev» 6.x-1.x-dev
Category:support request» task
Assigned to:Anonymous» cwgordon7
Status:active (needs more info)» patch (code needs review)
AttachmentSize
comment_cck_permission_renaming_01.patch1.02 KB

#6

Gerhard Killesreiter - July 14, 2008 - 20:25
Status:patch (code needs review)» fixed

applied

#7

Anonymous (not verified) - July 31, 2008 - 04:46
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.