Fixed "view" permission checked twice

Affected version
2.1.5

Siropu

Well-known member
In Entity/ResourceItem.php line 114 in canView method, you have this:

PHP:
if (!$this->Category || !$this->Category->canView())
        {
            return false;
        }
And below it, this:
PHP:
if (!$this->hasPermission('view'))
        {
            return false;
        }
$this->Category->canView() doesn't check for the same permission?
 

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 XFRM release (2.1.6).

Change log:
Remove duplicated permission check when checking viewing permissions for resources.
There may be a delay before changes are rolled out to the XenForo Community.
 
Top