- Affected version
- 2.1.7
Moderators can delete warnings and/or modify when they expire even though "Delete all warnings" permission is set to No or Never.
In src/XF/Entity/Warning.php functions canDelete() and canEditExpiry() include a code overriding "Delete all warnings" permission:
In src/XF/Entity/Warning.php functions canDelete() and canEditExpiry() include a code overriding "Delete all warnings" permission:
Code:
if ($this->warning_user_id == $visitor->user_id)
{
return true;
}