Drupal: block node editing for specific user(role)

485 views Asked by At

At my Drupal 7 site every registred user can add nodes. But sometimes i'd like to put some users to group e.g. "Temp ban" and block node add/edit for this users/group.

How can I do it?

3

There are 3 answers

0
okolobaxa On BEST ANSWER

Module Deny Access is what I was looking for.

2
Fky On
1
2pha On

Add another role.
Deny this role the ability to add nodes (or whatever it is you want to deny them).
Change users role to this new role.

Edit
Create a small module that implements hook_menu_alter to alter the 'access callback' of the paths you want, then in your custom access callback function, return true for the roles you want and false for the roles you don't want'.