I love this module, It was much needed!

However I did have one issue. This module was not setting permissions after a fresh install of a Drupal profile.

We are using the features module to add user created 'modules' to a profile.
Features are becoming popular so this fix might be important for us bunch.

I found the simple solution to be this:

function adminrole_cron_queue_info_alter() {
  adminrole_update_permissions();
}

After any Drupal install the cron is the last thing to run.
* this will cause adminrole permissions to be set LAST after all modules are installed on a Drupal install
* this will cause adminrole permissions to be resynced ever xhours (3hours default)
** helpful on edge cases that don't cause adminrole to rebuild!!!

I think this change is excellent.
Hope the maintainer does to :)

Comments

liquidcms’s picture

Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

so this runs on every cron run? not sure i want to have this running every time cron runs as there is nothing specifically in cron that requires it. if the real issue is running after site install; is there not a hook specifically for that?

nancydru’s picture

I agree. This should be in hook_enable().

liquidcms’s picture

Status: Postponed (maintainer needs more info) » Needs work

if someone does up a hook_install patch; i'll commit.

although, to be honest, i have set up a lot of sites, all of them use this module, and i have never seen an issue with admin role not being set for everything.