src/EntityDescriptor/User/AbstractUser.php
public static function loggedCanAccessToRoute($route, $accesslevel) {
		$user = static::getLoggedUser();
		if( !ctype_digit($accesslevel) ) {
			$accesslevel = static::getRoleAccesslevel($accesslevel);
		}
		$accesslevel = (int) $accesslevel;
		return ( empty($user) && $accesslevel < 0 ) ||
			( !empty($user) && $accesslevel >= 0 &&
				$user instanceof AbstractUser && $user->checkPerm($accesslevel));
	}
public static function loggedCanAccessToRoute($route, $accesslevel) {
		$user = static::getLoggedUser();
		if( !ctype_digit($accesslevel) ) {
			$accesslevel = static::getRoleAccesslevel($accesslevel);
		}
		$accesslevel = (int) $accesslevel;
		return ( empty($user) && $accesslevel < 0 ) ||
			( !empty($user) && $accesslevel >= 0 &&
				$user instanceof AbstractUser && $user->checkPerm($accesslevel));
	}
public static function loggedCanAccessToRoute ( $ route , $ accesslevel ) { $ user = static :: getLoggedUser ( ) ; if ( ! ctype_digit ( $ accesslevel ) ) { $ accesslevel = static :: getRoleAccesslevel ( $ accesslevel ) ; } $ accesslevel = ( int ) $ accesslevel ; return ( empty ( $ user ) && $ accesslevel < 0 ) || ( ! empty ( $ user ) && $ accesslevel >= 0 && $ user instanceof AbstractUser && $ user -> checkPerm ( $ accesslevel ) ) ; }
Check if this user can access to a module

@param string $route The route to look for
@param int $accesslevel The access level
@return boolean True if this user can access to $module
Check if this user can access to a module