4

Is there any module that would allow me to edit/delete nodes created by users with the same role I have?

2
  • Sorry, I still don't get it? You want the nodes to be edited/deleted by the same role as node author?
    – Dipen
    Commented May 1, 2011 at 4:46
  • yeah.drupal permission dont allow me to set permision like this.
    – user780
    Commented May 1, 2011 at 5:05

3 Answers 3

3

I would approach this by grouping users with organic groups module instead of by role. Roles are only for defining access level, not for making groups of users.

1
  • I think this would be the best solution. You can use collaborative groups.
    – pasine
    Commented May 31, 2011 at 22:58
1

I believe rules is capable of doing that. Something like:

On node edit: If user has role: author role (any other role except authenticated user) OR admin role

let it edit. Else, redirect with message.

Of course, this is just the logic outline. You'd have to do the actual PHP code for this to work. ^^

0
0

First of all, the module that provides the content type (via an implementation of hook_node_info()) is the only authority over who may edit content of that content type. If the module chooses not to consult role based permissions, the node access table or other modules, there is not much you can do about it (except for hacking the module). A module that meets the requirements you described can therefore (in general) not exist.

If you restrict your question to those content types, that are provided by the node module (i.e. the ones that are created via the Durpal UI): every authenticated user has the role "authenticated user". A module that meets the requirements you described would therefore grant all authenticated users write access to all nodes created by an authenticated user. This can be done by granting the permission edit any $type content to the role authenticated user for every content type $type.

This has the effect that authenticated users can also edit content created by anonymous users. I do not think this is a problem, because an authenticated user can always become an anonymous user, simply by logging out.

What remains do be done is granting anonymous users the permission to edit content of other anonymous users (yes, they are a role as well), but not content created by authenticated users. This is only a problem when you allow anonymous user to create content.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.