I want to add a functionality to my drupal site and I didn't find any module that satisfy my request. I want to automatically update the permissions of a specific role when a new permission is added. Is there any known module? if not which hook can I use to capture the addition of a new permission into the permission table? thanks

Comments

jaypan’s picture

There are no hooks for that.

Contact me to contract me for D7 -> D10/11 migrations.

DrupalOnFire’s picture

isn't there any alternative to risolve my problem?

jaypan’s picture

New permissions are only added during install, so you could use hook_install().

But maybe I'm misunderstanding what you are asking. What exactly do you want to do?

Contact me to contract me for D7 -> D10/11 migrations.

DrupalOnFire’s picture

Well, let's say I have a role called Admin and I want the users under Admin role have all the permissions. Under the current situation I have to check the permission table and enable the new permissions manually. It's kind of irritating. So I want to write a module that does this task automatically. That means my module shoud realize when a new permission is added to the permission table and he should enable it to Admin role without me checking it and enable it manually.

WorldFallz’s picture

For that specific use case, there's the adminrole module for d6 (this is part of core with d7).

DrupalOnFire’s picture

Thank you very much. This module fulfil my needs 100%