Fixed XF\Api\Controller::assertViewableAlert does not respect \XF::isApiCheckingPermissions()

Affected version
2.2.1

TickTackk

Well-known member
This:
PHP:
        if (!$alert->canView())
        {
            throw $this->noPermission();
        }
should be:
PHP:
        if (\XF::isApiCheckingPermissions() && !$alert->canView())
        {
            throw $this->noPermission();
        }
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.2).

Change log:
Respect API permission bypass when checking alert viewability
There may be a delay before changes are rolled out to the XenForo Community.
 
Top