MyBB Community Forums

Full Version: Invalid Permissions in the Reputation System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey guys. I hope everyone is well. I'm getting the following error when trying to add/remove reputation for users on my forum. It is still under construction, the instance was installed just three days ago, using version 1.8.37. The only addon I included was the MyBB Dark theme, not a single plugin. My problem is this: I am not allowed to interact with the reputation system with any user. I did a search, but apparently no topics fit the error. I made sure that:
  • The "Show reputations for users in this group?" and "Can give reputations to users? " options are enabled both for the user who will give/take points and for the user who will receive them. The users accounts are active/approved.
  • The "Points to Award/Take Away", "Maximum Reputations Allowed Per Thread", "Maximum Reputations Allowed Per User" and "Maximum Reputations Allowed Per Day" options are configured so that there are allowances and points available. It is worth mentioning that I am having the problem when trying to use the system for the first time.
I'm using MyBB's default groups, only changing the names. I tested interactions for all positions with everyone, and I always receive the following message (ignore the visuals, the CSS has not yet been customized):
[Image: MK9BxOC.png]
If the image does not load: https://i.imgur.com/MK9BxOC.png
In this screenshot, the test was done using an administrative account and trying to give reputation to a common registered user. Any ideas? Thanks in advance.
Hi Corvo,

Was this error occurring prior to you checking/adjusting the system settings for reputation in the ACP?
Hi Matt, thanks for the comment.

Unfortunately I didn't test it before making the changes. Is there any way to reset all reputation settings without affecting other settings?
is this option set:

ACP --> Configuration --> Reputation --> Enable Reputation Functionality --> Yes
Thanks for the comment, bv. Yes, all options are enabled: https://i.imgur.com/poNTiJw.png

[Image: poNTiJw.png]
Might be interesting to see if thepostbit_rep_button template for the theme in question has been changed from default.  Any options for that in the ACP?

Post Bit Templates - postbit_rep_button - Options.
Hello, nixer. Thanks. There is the option in the template menu. postbit_rep_button from Dark Theme template:

<a href="javascript:void(0)" onclick="MyBB.reputation({$post['uid']},{$post['pid']}); return false;" title="{$lang->postbit_reputation_add}" class="postbit_reputation_add"><span>{$lang->postbit_button_reputation_add}</span></a>

Same on the default template:

<a href="javascript:void(0)" onclick="MyBB.reputation({$post['uid']},{$post['pid']}); return false;" title="{$lang->postbit_reputation_add}" class="postbit_reputation_add"><span>{$lang->postbit_button_reputation_add}</span></a>
Update: It looks like may be a issue with CloudFlare. While the reputation button does not work in any way, the "report" button returns 403 to any user. Haven't tested it before, now the others threads about this bug makes sense to me. I didn't create any CloudFlare rules, just set their DNS. I'll talk with their support to see if they can spot the problem. If so, I'll post the solution here for anyone with the same issue.
Please let us know how you went. I and several other staff members cannot reproduce the error message so this is a mystery  Huh
They haven't responded to me yet, but I discovered from my tests that, if CloudFlare's "Under Attack" mode is active, the error message popup doesn't even appear, the request is simply blocked. This solves half the problem, but the permissions issue remains the same. I don't know if it helps, but I found the code snippet that validates permissions:

// Here we perform our validation when adding a reputation to see if the user
// has permission or not. This is done here to save duplicating the same code.
if($mybb->input['action'] == "add" || $mybb->input['action'] == "do_add")
{
        // This user doesn't have permission to give reputations.
        if($mybb->usergroup['cangivereputations'] != 1)
        {
                $message = $lang->add_no_permission;
                if($mybb->input['nomodal'])
                {
                        eval("\$error = \"".$templates->get("reputation_add_error_nomodal", 1, 0)."\";");
                }
                else
                {
                        eval("\$error = \"".$templates->get("reputation_add_error", 1, 0)."\";");
                }
                echo $error;
                exit;
        }

[...]


I believe I shouldn't touch it here to avoid causing more problems haha, I just wanted to know which parameters are involved in the verification. The settings in the panel are Ok, I don't know where else to look.
Pages: 1 2