Role Mismatch if there is a gap in the Role-IDs

comprojects - February 2, 2009 - 14:34
Project:Admin Role
Version:5.x-1.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

That happens, when you had deleted a role and later added another.
The culprit definitvely is the array_merge function used on line 75 - it happens to renumber the keys of the array!
It's not a matter of using ksort or asort though, that is just a matter of taste - and I would prefer to stick with ksort, because it reflects the ordering of Drupal in its role screens.

#1

comprojects - February 2, 2009 - 15:15
Status:active» needs review

so this is my corresponding patch...

AttachmentSize
adminrole_5.x-1.5.patch 884 bytes

#2

jaydub - August 14, 2009 - 18:04

Attached patch includes changes in the patch added to #360091: Use DRUPAL_AUTHENTICATED_RID instead of hard-coded '2'. This patch more or less brings the D5 admin setting form to the D6 level.

AttachmentSize
adminrole.module.360091.patch 980 bytes

#3

jaydub - August 14, 2009 - 18:14

For what it's worth, the development snapshot D5 version of Admin Role already has removed the array_merge and so is the same as the D6 module. The patch here and in #360091: Use DRUPAL_AUTHENTICATED_RID instead of hard-coded '2' just improves things a bit more.

#4

Dave Reid - November 25, 2009 - 02:30
Status:needs review» duplicate

This is just a duplicate of #360091: Use DRUPAL_AUTHENTICATED_RID instead of hard-coded '2' then which has a D5 patch included.

 
 

Drupal is a registered trademark of Dries Buytaert.