1

On my website, I have users with classic roles, but I want to add the possibility to assign permissions to specifics users. For example, a user has a role that doesn't allow the user to create articles, but I want to have a checkbox (on the edit page of the user's account) to grant this permission (and not to all users that have this role). Of course I can't create a specific role for that because I'm talking of many permissions specifics to users.

How can I perform this ?

  • Are you talking about multiple permissions like view article, edit article to single role? OR I miss something? If its so In drupal we already have role permission page, where we can assign permissions to role. https://<drupal root>/admin/people/permissions – Milind Sep 13 '17 at 8:28
1

Just use the Group module, and create a content type like "Personal Groups". And then create a "group" for each user (using something like the user's name as its label), of group type "Personal Groups" (or whatever you want to label it).

Tune the permissions which come with the Group module (which are different from standard Drupal permissions!) to fit your needs.

Possibly you also want to use all sorts of integrations with modules such as the Rules module or the Views module (the Group module is entirely entity based, so those kind of integrations or virtually unlimited). As a sample: if a user enables the checkbox in their profile (as in your question), you could have the Rules module intercept such event, and then "Create a new entity (= i.e. a Group)", and / or trigger some kind of approval/notification process to make such creation of a requeted group happen.

For more details about the various roles and permissions, refer to my answer to "What are the various roles supported by the Group module?".

Resources

PS: This answer applies for either Drupal 7, or Drupal 8.

1

I came across a similar situation and I think my is solution either the Group module or the og module. I didn't try them yet but both seems promising. I'm about to try them now.

  • @Pierre.Vriens thank you I edited my answer. It's 'Group' module. In terms of "OG" will have an alpha release next month (at least that's what they're saying). I was checking yesterday the progress and the discussions about this project and seems that the UI is not ready yet but the basic functionality is ready. – Ismini Sep 13 '17 at 8:52
  • Merci for the correction, and the OG-update ... – Pierre.Vriens Sep 13 '17 at 9:11
  • You are always welcome my friend! :) – Ismini Sep 13 '17 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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