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

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

67 lines
1.9 KiB
C++

//----------------------------------------------------------------------------
//
// Copyright (C) 2010 Intel Corporation
//
// File: ConnectedSystems.h
//
// Contents: This class handles connected systems per request
//
//----------------------------------------------------------------------------
#ifndef _CONNECTED_SYSTEMS__H__
#define _CONNECTED_SYSTEMS__H__
#include <set>
#include <map>
#include <ace/Refcounted_Auto_Ptr.h>
typedef std::set<ACE_CString> SYSTEMS_SET;
class Connected_Systems_Enumeration_Data
{
public:
Connected_Systems_Enumeration_Data();
time_t get_expires(void) {return _expires;}
SYSTEMS_SET::iterator& get_systems_set_iterator(void) { return _systems_set_iterator; };
SYSTEMS_SET::iterator get_systems_set_end(void) { return _systems_set.end(); };
private:
Connected_Systems_Enumeration_Data(const Connected_Systems_Enumeration_Data&);
SYSTEMS_SET _systems_set;
SYSTEMS_SET::iterator _systems_set_iterator;
time_t _expires;
} ;
typedef ACE_Refcounted_Auto_Ptr<Connected_Systems_Enumeration_Data, ACE_Thread_Mutex> ConnectedSystemsEnumerationDataPtr;
typedef std::map<ACE_UINT32, ConnectedSystemsEnumerationDataPtr> CONNECTED_SYSTEMS_MAP;
class Connected_Systems
{
private:
Connected_Systems(void); // Ctor.
public:
static Connected_Systems& instance() {
static Connected_Systems c;
return c;
}
bool add_new_enumeration(ACE_UINT32 &context ,const ConnectedSystemsEnumerationDataPtr& cs);
bool context_exists(ACE_UINT32 context);
ConnectedSystemsEnumerationDataPtr* get_connected_system_enumeration_data_ptr(ACE_UINT32 context);
bool release_context(ACE_UINT32 context);
bool release_expired_enumerations(void);
bool max_concurrent_enums_exceeded(void);
private:
// Data members
ACE_UINT32 _curr_context;
CONNECTED_SYSTEMS_MAP _connected_systems_map;
// Read/Write lock of this container
ACE_Recursive_Thread_Mutex rwmutex_;
};
#endif //_CONNECTED_SYSTEMS__H__