Closed (fixed)
Project:
Permissions API
Version:
6.x-2.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
11 May 2009 at 03:28 UTC
Updated:
19 May 2009 at 12:06 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| fix-permissions_get_permissions_for_role-calls.patch | 1.82 KB | james.cartledge |
Comments
Comment #1
ebeyrent commentedThanks for reporting this, and for the patch as well! I have applied your patch and released a new version.
Comment #2
ebeyrent commented