After installing a new Drupal site with a custom profile enabling many contrib modules, I found an administrator account was lacking many necessary privileges. I looked at adminrole.module and found it only rebuilds permissions when submitting the modules page (which suggests it will also not rebuild when modules are enabled/disabled via drush, which is our primary management tool).

See also #785246: CCK content type import and #753606: Support "Field Permissions" module... I can't say for sure, but I would imagine any scenario that would require rebuilding permissions would flush the caches, so I think it would be best for adminrole to do the rebuild on a cache clear. Patch submitted, tested with drush cc all.

adminrole_cache.patch789 bytesmikeryan
PASSED: [[SimpleTest]]: [MySQL] 0 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more


q0rban’s picture


q0rban’s picture

Status: Active » Needs review
jack.r.abbit’s picture

That change worked for me for when you clear the caches.

However, it still doesn't cover all cases. We need permissions to be updated when a new content type is added too. That action does not appear to clear the caches. But that is a different issue.

Robin van Emden’s picture

Status: Needs review » Reviewed & tested by the community

Patch tested, works for me. Please commit.

NancyDru’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (outdated)