Allow renaming of roles

David Lesieur - August 26, 2007 - 00:02
Project:Role Delegation
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Renaming a role currently causes the loss of role_delegation permissions for that role.

#1

Christefano - October 21, 2007 - 19:40

Does this mean that Role Delegation isn't using role IDs?

#2

David Lesieur - October 22, 2007 - 16:01

The problem is that the permission names created by Role Delegation are derived from role names, and Drupal uses permissions names as IDs. Using role IDs is not an option here, as that would make the Access control settings unusable.

Something we could probably do is updating the permissions when the role editing form ("user_admin_role") is submitted.

#3

Andrew Schulman - October 13, 2009 - 15:27
Version:5.x-1.0» 6.x-1.2
Status:active» needs review

Something we could probably do is updating the permissions when the role editing form ("user_admin_role") is submitted.

The attached patch does this. When role X is renamed or deleted, we rename or delete (resp.) the "assign X role" permission in every entry in the permission table. Please test.

AttachmentSize
role_delegation_rename_delete_roles.patch 2.29 KB
 
 

Drupal is a registered trademark of Dries Buytaert.