I have certain content type .. when node is save it create: user,vocabulary
I used hook_user_save and taxonomy_vocabulary_save..
Which the vocabulary name is $node->title ..
All I need now.. How i give the NEW USER permission for NEW vocabulary?

permission for EDIT and DELETE the new vocabulary

  • You are creating a user depending on the title of your node ? It's important to know that permissions are set on role level, so users created need to have a specific role and then you have to add permissions in that role. – guilhom Jul 9 '17 at 15:37
  • @guilhom yes.. they have a specific role already 'roles' => array(4=>TRUE), I delete (same as user).. – a.alshamiri Jul 9 '17 at 15:44

By default, Drupal comes with a single permission to administer vocabularies, so if you want your new user to be able to access only the new created vocabulary, you should take a look at the module Vocabulary Permissions Per Role. I never used it, but it sounds to fit your needs.

You'll need to explore how it handles the new permission and configure the module each time you create a new vocabulary.

  • so i can't give permissions to user of the same role? – a.alshamiri Jul 9 '17 at 15:55
  • Users with the same role will have the same permission by default. – guilhom Jul 9 '17 at 15:56

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.