public function get_user_permission($user)
	{
		$db =  \App::get('db');
		$quoted_project_id = $db->quote($this->id);

		if ($user == "anonymous")
		{
			$user = '0';
		}
		$quoted_user = $db->quote($user);
		if (is_numeric($user))
		{
			$query = "SELECT action FROM `#__trac_user_permission` AS up WHERE up.trac_project_id=$quoted_project_id AND up.user_id=$quoted_user;";
		}
		else
		{
			$query = "SELECT action FROM `#__trac_user_permission` AS up, `#__users` AS u WHERE up.trac_project_id=$quoted_project_id AND u.id=up.user_id AND u.username=$quoted_user;";
		}

		$db->setQuery($query);
		$result = $db->loadColumn();

		return $result;
	}