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

TickTackk

Well-known member
Affected version
2.2.1
This:
PHP:
        if (!$alert->canView())
        {
            throw $this->noPermission();
        }
should be:
PHP:
        if (\XF::isApiCheckingPermissions() && !$alert->canView())
        {
            throw $this->noPermission();
        }
 
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.
 
Back
Top Bottom