/**
* Method to check Menu object authorization against an access control object and optionally an access extension object
*
* @param integer $id The menu id
*
* @return boolean
*
* @since 1.5
*/
public function authorise($id)
{
$menu = $this->getItem($id);
if ($menu) {
$access = (int) $menu->access;
// If the access level is public we don't need to load the user session
if ($access === 1) {
return true;
}
return \in_array($access, $this->user->getAuthorisedViewLevels(), true);
}
return true;
}