lvfengfree b92e1119ae fix: 修复菜单为空问题 - 移除后端过滤home路由的错误逻辑
- 修复RouteService中错误过滤home路由的问题
- 后端现在正确返回所有用户有权限的路由
- 添加设备管理相关功能(列表、在线监控、电源管理、远程监控)
- 添加详细的修复文档和重启脚本
- 更新权限配置脚本

问题根源:后端代码中有逻辑会过滤掉home路由,导致前端收到空数组,无法生成菜单
解决方案:移除过滤home路由的逻辑,让后端返回所有有权限的路由
2026-03-01 09:50:19 +08:00

110 lines
2.1 KiB
C++

//----------------------------------------------------------------------------
//
// Copyright (C) Intel Corporation, 2006 - 2007.
//
// File: DataStructures.cpp
//
// Contents: General DataStructures
//
// Notes:
//----------------------------------------------------------------------------
#include "DataStructures.h"
#include <ace/INET_Addr.h>
#include <sstream>
#define MAX_ADDRESS_LEN 300 // to be precise should probably be 262
string ServerData::getAddressStr() const {
stringstream str;
str << _hostname << ":" << _port;
return str.str();
}
//-----------------------------------------
// Deletes MC subscribers list
//-----------------------------------------
MCList::~MCList()
{
clearList();
}
void MCList::clearList()
{
MCList::iterator mc_data_iterator;
try
{
for(mc_data_iterator = MCList::begin();
mc_data_iterator != MCList::end();
mc_data_iterator++)
{
delete (*mc_data_iterator);
}
clear();
}
catch(...)
{
ACE_DEBUG((MY_DEBUG
ACE_TEXT("~MCList::clearList: got exception\n")));
}
}
//-----------------------------------------
// Deletes AuthServerHash
//-----------------------------------------
AuthServerHash::~AuthServerHash()
{
AuthServerHash::iterator auth_data_iterator;
try
{
for(auth_data_iterator = AuthServerHash::begin();
auth_data_iterator != AuthServerHash::end();
auth_data_iterator++)
{
delete (*auth_data_iterator).second;
}
AuthServerHash::clear();
}
catch(...)
{
ACE_DEBUG((MY_DEBUG
ACE_TEXT("~AuthServerHash: got exception\n")));
}
}
void AuthServerHash::clearHash()
{
AuthServerHash::iterator auth_data_iterator;
try
{
for(auth_data_iterator = AuthServerHash::begin();
auth_data_iterator != AuthServerHash::end();
auth_data_iterator++)
{
delete (*auth_data_iterator).second;
}
clear();
}
catch(...)
{
ACE_DEBUG((MY_DEBUG
ACE_TEXT("AuthServerHash::clearHash: got exception\n")));
}
}
STATUS ServerData::validateINETdata() const
{
ACE_INET_Addr address;
if (address.set(_port, _hostname.c_str()) != STATUS_SUCCESS)
{
return STATUS_FAILURE;
}
return STATUS_SUCCESS;
}