Groups might not be recognised with the MyBB Importer

A continuation of a discussion in the installation section relating to the MyBB Importer.

The importer currently checks the names of the super mod and admin groups literally, but this’ll fail to detect an admin / super mod, if these groups are renamed by the administrator or the administrator creates their own custom admin / super mod groups.

I wrote some instructions on how to fix the bug in the discussion above (in short, check the flags on the group to tell what type of group it is), but I’m not too familiar with Ruby, and don’t have an environment at the ready to test in, so I’m posting this instead.

Edit: I forgot there was a feature to fork discussions :flushed:


That’s the type of edge case that few importers handle. Your solution sounds like the most robust one. Usually, you have just one data set to go by and have neither the inclination nor any reason to catch stuff like that.

It’s probably because cancp and these other things are buried in fifty or so columns. There’s a column in the groups table for each permission for efficiency.

It doesn’t store the admin permissions though, those are stored elsewhere on a per-user basis, but those are only used for locking down sections of the ACP, and are stored with PHP’s serialize(), if I recall.

cancp is used everywhere outside it, every time an admin check is needed.

And to be fair to whoever made the importer, cancp is a slightly cryptic name. I only know of it because I’ve created custom MyBB plugins before for my own forums (which have since closed down) and I checked cancp to see if someone’s an admin.

cancp basically means can control panel. The Administrator Control Panel, to be accurate.
Moderators have their own more restricted control panel.