Download & Extend

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

Project:Admin role
Version:5.x-1.5
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (duplicate)

Issue Summary

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.

Comments

#1

Status:active» needs review

so this is my corresponding patch...

AttachmentSizeStatusTest resultOperations
adminrole_5.x-1.5.patch884 bytesIgnored: Check issue status.NoneNone

#2

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.

AttachmentSizeStatusTest resultOperations
adminrole.module.360091.patch980 bytesIgnored: Check issue status.NoneNone

#3

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

Status:needs review» closed (duplicate)

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

nobody click here