Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 There is a case, when XThreads remove admin permissions during installation
asmile Offline
Junior Member
**
Posts: 2
Joined: Jul 2012
Post: #1
There is a case, when XThreads remove admin permissions during installation
Hi!

First of all - thanks for excellent plugin! Great

Come back to the subject.

I found this on my test environment, which I create by copying of my production environment (MyBB 1.6.8).

In my database, for some reasons, field mybb_adminoptions.permissions are empty for Administrators group members (except user with uid=0). MyBB are happy with that and use inheritance from group permissions.

During installation XThreads do unserialisation from mybb_adminoptions.permissions, add permission to manage additional fields and serialize back.

As result - all admins with uid>0 lost any Administrator permissions except permission to manage additional fields.

Why this field are empty ? Probably because my forum starts with phpbb (very old and very customized version), then, some years ago, it was semi-manually migrated to MyBB 1.4.х, then it was upgraded to MyBB 1.6.x. All admins are admins already from phpbb's times.

I'll suggest to add some check for mybb_adminoptions.permissions content in installation procedure. Or remove automated permission addition at all and leave related message in readme to add this permission manually.

thanks again.
(This post was last modified: 07-20-2012 08:42 AM by asmile.)
07-20-2012 08:36 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: There is a case, when XThreads remove admin permissions during installation
Interesting observation.  Thanks for reporting.

I've made the following modification in inc/xthreads/xt_install.php
for all instances of

PHP Code:
$perms = unserialize($adminopt['permissions']);

replace with

PHP Code:
$perms = @unserialize($adminopt['permissions']);
if(empty($perms)) continue;


My Blog
(This post was last modified: 07-21-2012 06:22 PM by ZiNgA BuRgA.)
07-21-2012 06:20 PM
Find all posts by this user Quote this message in a reply
asmile Offline
Junior Member
**
Posts: 2
Joined: Jul 2012
Post: #3
RE: There is a case, when XThreads remove admin permissions during installation
Great. thanks.
07-21-2012 10:46 PM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: