Each node type provided by node module has 3 permissions: 'create', 'edit', and 'edit own'.
I think forum should also have "edit forum' or 'edit forum topics' allowing to edit all forum topics.
This would allow defining a full moderator role - a person responsible not only for comments but also topics.
This also applies to 6.x and is partially covered in drupal.org/node/132211

CommentFileSizeAuthor
#5 forum_edit.patch852 bytescatch
#3 edit forum topic.patch846 bytesPancho
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Crimson’s picture

I so totally agree. Currently, I can't assign somebody the role of a forum moderator without giving them the "administer nodes" permission and that to me, is very very broken. I don't want to give them that much access.

Would this functionality be that difficult to code?

Crimson’s picture

I guess it wasn't that hard. Should of added this in earlier. Starts at line 110. You can see the parts where I added the "edit forum topics" to the permission list and gave people with that permission the ability to "update" and "delete".

/**
 * Implementation of hook_access().
 */
function forum_access($op, $node) {
  global $user;

  if ($op == 'create') {
    return user_access('create forum topics');
  }

  if ($op == 'update' || $op == 'delete') {
    if (user_access('edit own forum topics') && ($user->uid == $node->uid)) {
      return TRUE;
    }
    if (user_access('edit forum topics')) {
      return TRUE;
    }
  }
}

/**
 * Implementation of hook_perm().
 */
function forum_perm() {
  return array('create forum topics', 'edit own forum topics', 'administer forums', 'edit forum topics');
}
Pancho’s picture

Version: 5.x-dev » 6.x-dev
Category: feature » task
Priority: Normal » Critical
FileSize
846 bytes

While the private forum functionality is definitely out of range for D6, this might be doable, as this is a pretty easy, leads to no confusion and allows for setting up a forum moderator role, which is IMHO critical. I leave the decision to others, but provide a patch.

Gábor Hojtsy’s picture

Status: Active » Needs work

Let's at least consider how other edit permissions are named in Drupal 6.

catch’s picture

Status: Needs work » Needs review
FileSize
852 bytes

This would be very handy, brings forum permissions into line with the rest of core, and now has consistent naming.

catch’s picture

Title: 'edit forum topics' permission » 'edit any forum topic' permission
chx’s picture

Status: Needs review » Reviewed & tested by the community

Nice little patch, and I think it is consequent with the rest of D6.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Yay, now forum moderators are possible :) Committed.

moshe weitzman’s picture

the new permission was not properly checked in hook_access(). see http://drupal.org/node/203582

Anonymous’s picture

Status: Fixed » Closed (fixed)

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