0

Using a custom module, is it possible to assign permissions to specific users independently from the assigned roles (which means, without to create temporary roles to which users are assigned), or is it preferable not doing so?

3 Answers 3

3

Once again, there is a module that allows to do that:

http://drupal.org/project/user_permissions

I however agree that this doesn't sound like a good idea. Not because of Performance but because of the Maintainability of your site.

Maybe in a situation where you want to give users some permissions dynamically based on an action they just did but unless you have 30 different possible combinations, I'd suggest to create some roles and then assign these dynamically. One example of a module that does this is userpoints_roles from the Userpoints Contrib project, that assigns roles to users once they reach a certain amount of points.

0
3

I believe user-based permissions (as opposed to roles-based permissions) to be bad (security) practice. They tend to don't scale very well when the users base grow. With the multiplication of users, permissions management becomes harder and error prone. Roles based permissions doesn't add too much management overhead and scale much better.

That said, the Drupal permissions control is roles-based. I'm not aware of any module allowing it to becomes users-based. A naive solution would be to (automatically) create a role for each user. If you have only a few users, this shouldn't be a performance issue.

0
1

The right way of doing this is by the using Node Access. Node Access isn't easy to grasp, however start with the 2010 node access conference session

However it is probably better to design the roles properly and coherently.

0

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.