As the title says. The signature is permissions_get_permissions_for_role($role_name) but the func is called in 4 places as: permissions_get_permissions_for_role($role->rid).

This always returns an empty string, which means a new row is created in the permission table every time e.g. permissions_grant_permissions is called. This just bit me rather badly when I used it to transfer changes into production and all my existing permissions 'disappeared'.

The patch simply changes all permissions_get_permissions_for_role calls to pass in the role name (as expected) rather than the role id.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ebeyrent’s picture

Assigned: Unassigned » ebeyrent
Status: Needs review » Fixed

Thanks for reporting this, and for the patch as well! I have applied your patch and released a new version.

ebeyrent’s picture

Status: Fixed » Closed (fixed)