Hello:

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

Something like this

/**
 * 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

Comments

brst t’s picture

+1 for this

sinasalek’s picture

Same here

killes@www.drop.org’s picture

Status: Active » Postponed (maintainer needs more info)

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

cwgordon7’s picture

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".

cwgordon7’s picture

Version: 5.x-1.x-dev » 6.x-1.x-dev
Assigned: Unassigned » cwgordon7
Category: support » task
Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new1.02 KB
gerhard killesreiter’s picture

Status: Needs review » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)

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