Resource icon

Can Warn Staff 1.2.1

No permission to download

Xon

Well-known member
Xon submitted a new resource:

Can Warn Staff - Allow moderators and administrators to be warned.

Allow moderators and administrators to be warned.

AdminCP access can obviously bypass any warning issued, and warnings themselves can be edited or deleted depending on permissions for the user.

Introduces 4 new permissions:
  • Give moderators warnings directly.
  • Give administrators warnings directly.
  • Delete all warnings for Moderators.
  • Delete all warnings for Administrators.
Read more about this resource...
 
Last edited:
I've an error:
Code:
Undefined index: global_permission_cache

    XenForo_Application::handlePhpError() in SV/Helper/Permissions.php at line 21
    SV_Helper_Permissions::LoadPermissionsForUser() in SV/Helper/Permissions.php at line 43
    SV_Helper_Permissions::CheckGlobalPermission() in SV/CanWarnStaff/XenForo/Model/User.php at line 18
    SV_CanWarnStaff_XenForo_Model_User->canWarnUser() in XenForo/ReportHandler/User.php at line 51
    XenForo_ReportHandler_User->getVisibleReportsForUser() in XenForo/Model/Report.php at line 184
    XenForo_Model_Report->getVisibleReportsForUser() in XenForo/ControllerPublic/Report.php at line 66
    XenForo_ControllerPublic_Report->actionIndex() in XenForo/FrontController.php at line 347
    XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
    XenForo_FrontController->run() in /kunden/portugalinks.de/xenforo/public_html/index.php at line 13

any ideas?

Kai
 
@kailew Are you using the latest version? v1.1.1 was a patch for some errors very similar to that error message, but it is always possible I missed something.
 
Xon updated Can Warn Staff with a new update entry:

Performance improvements

Now uses permission combination id's rather than user ids for determining if the database requires querying for permissions.

If all the users on a page are in the same set of groups, then it will only issue 1 query. If the viewing user is in the same set of groups, then no extra queries will be issued.

Guest users or posts with no owner, do not trigger any extra queries as they are hardcoded to never be able to issue warnings.

Read the rest of this update entry...
 
We've run into a slight issue with this one where individuals who have turned conversations off are not receiving warnings. As soon as we turn off this addon, warnings are then sent normally as designed.
 
We've run into a slight issue with this one where individuals who have turned conversations off are not receiving warnings. As soon as we turn off this addon, warnings are then sent normally as designed.
How do you mean "turned conversations off"?

This addon doesn't interact with conversations, it only touches if a user can Warn another user (and if a user profile can be reported)
 
Last edited:
Individuals can turn off conversations by unchecking the box.

conversations.webp

Staff members are permitted to send conversations regardless of this setting.

With the addon turned on, it follows the permission of the user being warned, rather than the permissions set in the Moderating usergroup which is set to bypass user privacy (and yes, they're also allowed to warn content moderators).

In this case, the user was not part of the moderating usergroup, nor were they a content moderator. So the warning should have been sent to their inbox regardless of the user settings.
 
Individuals can turn off conversations by unchecking the box.

View attachment 108516

Staff members are permitted to send conversations regardless of this setting.

With the addon turned on, it follows the permission of the user being warned, rather than the permissions set in the Moderating usergroup which is set to bypass user privacy (and yes, they're also allowed to warn content moderators).

In this case, the user was not part of the moderating usergroup, nor were they a content moderator. So the warning should have been sent to their inbox regardless of the user settings.
The XenForo Warning code doesn't even check those setting, it just creates the conversation with the user.

I just tested this on my test site with a user who only accepts PMs from people who they follow (with an empty follow list) and they still got the conversation. So I can't reproduce this.

Can you provide a list of addons which you have installed? It might be some wonky interaction with another addon.
 
Turn off PMs and test please. If it still works then, we'll start looking at an addon conflict.
 
Turn off PMs and test please. If it still works then, we'll start looking at an addon conflict.
I did.

conversation_options.webp

I use this addon (and all the other addons I've published on XF.com) on SpaceBattles and Sufficient Velocity and haven't had an issue with it.
 
Back
Top Bottom