okolobaxa
okolobaxa

Reputation: 342

Drupal: block node editing for specific user(role)

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?

Upvotes: 1

Views: 507

Answers (3)

okolobaxa
okolobaxa

Reputation: 342

Module Deny Access is what I was looking for.

Upvotes: 0

2pha
2pha

Reputation: 10155

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

Upvotes: 1

Related Questions