Not a bug I lost the superadministrator condition after upgrade

lms

Well-known member
Affected version
XF 2.0.0 Beta 1
When i log in into ACP, and i want to see the administrators permissions, i get a error ("You must be a super administrator to access this page. This can be configured in the Administrators section of the Admin CP."). I can´t access to administrators section and i can't ban users. Into config.php i configured the $config['superAdmins'] = '1,2'; just as it was in XF1 before upgrade (true that was commented on the file at the time of updating).
When i can ban an user, edit permissions, etc. I get this error.
79.webp

Salud2
 
(true that was commented on the file at the time of updating)
The superAdmins line was commented out of the config during upgrade? If so, that's the problem.

XF 2.0 doesn't actually use superAdmins in the config anymore. You can set an Admin as a Super Admin via the Admin CP.

In the case that there is no super admins configured (because they are commented out) then the Admin with user_id 1 will likely be marked as a Super admin. If that user doesn't exist anymore, then you will need to update the xf_admin table directly.

The undefined index error is a bug, and it has been fixed in beta 2.

You might be able to fix it yourself with this query:
Code:
DELETE FROM xf_permission_entry_content
WHERE permission_value = ''
 
That's sort of suggesting that your existing Super Admin accounts are less secure than your config file which absolutely shouldn't be the case.
 
That is not untrue, but Super admins can already currently add / remove any user as an admin and grant all permissions to other admins.

The risk isn't in how super admins can be set, the risk is in what super admins can do, and that risk hasn't really changed.
 
I liked it in the config file as I could just remove it from the file until the role was required to do something and then add it back in and save.
Exactly.

That is not untrue, but Super admins can already currently add / remove any user as an admin and grant all permissions to other admins.
Yes, but if you currently have no super admins, then no more admins can be currently set (Along with no current admin permissions can be changed) :) As @Mike Edge stated, I do the same thing. A lot of things a limited to my admins, including me. We have what we need to administrate the forums. Even with 2FA, extra security precautions are nice :)

God forbid my account ever get breached. They then have total control over the forums. With me only giving myself super admin when needed, it just helps prevents any un wanted actions just a little more.
 
The superAdmins line was commented out of the config during upgrade? If so, that's the problem.

XF 2.0 doesn't actually use superAdmins in the config anymore. You can set an Admin as a Super Admin via the Admin CP.

In the case that there is no super admins configured (because they are commented out) then the Admin with user_id 1 will likely be marked as a Super admin. If that user doesn't exist anymore, then you will need to update the xf_admin table directly.
I'm the ID number 1. I have restored it through the database.
The undefined index error is a bug, and it has been fixed in beta 2.

You might be able to fix it yourself with this query:
Code:
DELETE FROM xf_permission_entry_content
WHERE permission_value = ''
Yes, It's fixed. Thanks.

Salud2
 
Shame. Kinda liked it that way for better security.
I liked it in the config file as I could just remove it from the file until the role was required to do something and then add it back in and save.
Why did you change it ?
I'm the ID number 1. I have restored it through the database.

Yes, It's fixed. Thanks.

Salud2

Suggestion made, https://xenforo.com/community/threads/set-super-administrators-in-config-file.134088/
 
Back
Top Bottom