english/libraries/joomla/application/menu.php
/**
	 * Method to check JMenu object authorization against an access control
	 * object and optionally an access extension object
	 *
	 * @param   integer  $id	The menu id
	 *
	 * @return  boolean  True if authorised
	 * @since   11.1
	 */
Method to check JMenu object authorization against an access control
object and optionally an access extension object

@param   integer  $id        The menu id

@return  boolean  True if authorised
@since   11.1
Method to check JMenu object authorization against an access control object and optionally an access extension object @param integer $id The menu id @return boolean True if authorised @since 11 . 1
public function authorise($id)
	{
		$menu	= $this->getItem($id);
		$user	= JFactory::getUser();
		if ($menu) {
			return in_array((int) $menu->access, $user->getAuthorisedViewLevels());
		}
		else {
			return true;
		}
	}
public function authorise ( $ id ) { $ menu = $ this -> getItem ( $ id ) ; $ user = JFactory :: getUser ( ) ; if ( $ menu ) { return in_array ( ( int ) $ menu -> access , $ user -> getAuthorisedViewLevels ( ) ) ; } else { return true ; } }
Method to check JMenu object authorization against an access control
 object and optionally an access extension object
Method to check JMenu object authorization against an access control object and optionally an access extension object