Closed (fixed)
Project:
Admin role
Version:
5.x-1.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 May 2007 at 03:29 UTC
Updated:
7 Jul 2007 at 05:16 UTC
Jump to comment: Most recent file
Comments
Comment #1
vaelen commentedThis seems to happen because the roles are numbered by the order they are returned (alphabetically) instead of by their actual number. Since anonymous is 1, and I bet your admin group is called 'admin' and shows up as the first one in the list (mine did too), selecting admin stores the admingroup_admingroup value as "1", which is really the role id for 'anonymous user'. I just opened up admingroup.module and hardcoded the value to '3' (the number of my admin role) at line 47.
Comment #2
jonhattanattached a patch for version 5.x-1-1 of the module. It includes two extra lines in order to sort the array by keys, overriding the default behaviour of sorting by values.
$u_roles = user_roles();
ksort($u_roles);
Comment #3
jonhattansame patch for dev version
Comment #4
macros commentedI made the changes as specified, and has fixed the error. Cheers!
Comment #5
vikingew commentedYes this patch works, w/o it the module is a disaster so have a new release out fast.
Comment #6
vikingew commentedset it to critical as this bug ruins permissions, and also version 5.x.1.1 as dev seem to be an old initial release and not upto date.
Comment #7
agentrickardPatch verified for 5.x.1.1
Comment #8
ryo commentedWell, in fact, the bug that the anonymous is assigned as "Admin Role" has been fixed by the patch.
But still, when I create a new "administrator" role and assign it as "Admin Role" in
/admin/settings/adminrole,
all the check boxes of the "administrator" role are blank, in other words,
no access privillages are given to "Admin Role".
Comment #9
agentrickard@ryo
I think you have to reload / re-save the Modules overview page to trigger the saving of admin role access rules.
Comment #10
ryo commented@agentrickard
Thanks for the advice.
I did what you said, but the situation didn't changed.
I deleted the role "administrator", installed the 5.x-1.x-dev, and ran update.php,
created user role "admin", and assigned it as "Admin Role",
but the result was the same.
But I found why at last.
I had forgotten that I had installed "user protect module".
So I once disabled the "user protect module" and assigned the role "admin" as "Admin Role",
and things went perfect.
The mistery is that although the role "admin"s 'role' was not protected in the setting of "user protect module",
the protection worked. I don't know why.
Anyway I think it would be better to mention that there is a kind of conflict between the two modules.
Comment #11
JacobSingh commentedI've committed the patch (the dev one actually had a parse error in it, so I picked up the other one). Will make a release right away, Thanks!
I also updated the description regarding the possible conflict (didn't confirm it though)
Comment #12
(not verified) commented