- 修复RouteService中错误过滤home路由的问题 - 后端现在正确返回所有用户有权限的路由 - 添加设备管理相关功能(列表、在线监控、电源管理、远程监控) - 添加详细的修复文档和重启脚本 - 更新权限配置脚本 问题根源:后端代码中有逻辑会过滤掉home路由,导致前端收到空数组,无法生成菜单 解决方案:移除过滤home路由的逻辑,让后端返回所有有权限的路由
173 lines
5.5 KiB
C#
173 lines
5.5 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: CIM_RoleLimitedToTarget.cs
|
|
//
|
|
// Contents: The Role object class is used to represent a position or set of responsibilities within an organization, organizational unit or other scope. When explicitly restricting the target elements that may be accessed from this Role, this association MUST be used.
|
|
// This file was automatically generated from CIM_RoleLimitedToTarget.mof
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Text;
|
|
using System.Globalization;
|
|
using System.Xml.Serialization;
|
|
using System.IO;
|
|
using Intel.Manageability.WSManagement;
|
|
using Intel.Manageability.Cim.Untyped;
|
|
|
|
|
|
namespace Intel.Manageability.Cim.Typed
|
|
{
|
|
/// <summary>
|
|
///The Role object class is used to represent a position or set of responsibilities within an organization, organizational unit or other scope. When explicitly restricting the target elements that may be accessed from this Role, this association MUST be used.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RoleLimitedToTarget")]
|
|
[System.Xml.Serialization.XmlRootAttribute("CIM_RoleLimitedToTarget", Namespace="http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RoleLimitedToTarget", IsNullable=false)]
|
|
public class CIM_RoleLimitedToTarget : CimBase
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public CIM_RoleLimitedToTarget() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public CIM_RoleLimitedToTarget(string xml): base((IWSManClient)null)
|
|
{
|
|
this.Deserialize(xml);
|
|
}
|
|
/// <summary>
|
|
/// Constructor which recieves a Ws-Management client object.
|
|
/// </summary>
|
|
/// <param name="client">Ws-Management client</param>
|
|
public CIM_RoleLimitedToTarget(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, The Role whose target set is explicitly defined.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference DefiningRole
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("DefiningRole")[0];
|
|
CimReference epr = new CimReference("DefiningRole", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("DefiningRole",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Key, Required, Reference to the target set that can be accessed from the Role.
|
|
/// </summary>
|
|
[CimField(true, false)]
|
|
public virtual CimReference TargetElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("TargetElement")[0];
|
|
CimReference epr = new CimReference("TargetElement", XmlNamespace, innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
this.SetOrAddField("TargetElement",value.Serialize(false));
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_RoleLimitedToTarget class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of CIM_RoleLimitedToTarget objects</returns>
|
|
public static Collection<CIM_RoleLimitedToTarget> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<CIM_RoleLimitedToTarget> ret = CimBase.Enumerate<CIM_RoleLimitedToTarget>(client, cimKeys);
|
|
return new Collection<CIM_RoleLimitedToTarget>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of CIM_RoleLimitedToTarget class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of CIM_RoleLimitedToTarget objects</returns>
|
|
public static Collection<CIM_RoleLimitedToTarget> Enumerate(IWSManClient client)
|
|
{
|
|
List<CIM_RoleLimitedToTarget> ret = CimBase.Enumerate<CIM_RoleLimitedToTarget>(client);
|
|
return new Collection<CIM_RoleLimitedToTarget>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of CIM_RoleLimitedToTarget if it is singular.
|
|
/// Note: This method will succeed only if a single instance of the class exists.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
public static void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<CIM_RoleLimitedToTarget>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the CIM_RoleLimitedToTarget class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CimBase.CimKeys
|
|
{
|
|
/// <summary>
|
|
/// Key, Required, The Role whose target set is explicitly defined.
|
|
/// </summary>
|
|
|
|
public virtual CimReference DefiningRole
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("DefiningRole");
|
|
CimReference epr = new CimReference("DefiningRole", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RoleLimitedToTarget", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("DefiningRole", value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Key, Required, Reference to the target set that can be accessed from the Role.
|
|
/// </summary>
|
|
|
|
public virtual CimReference TargetElement
|
|
{
|
|
get
|
|
{
|
|
string innerXML = GetKey("TargetElement");
|
|
CimReference epr = new CimReference("TargetElement", "http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_RoleLimitedToTarget", innerXML);
|
|
return epr;
|
|
}
|
|
set
|
|
{
|
|
SetOrAddKey("TargetElement", value);
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|