28 lines
873 B
C#
28 lines
873 B
C#
using System;
|
|
|
|
namespace Lskj.CommandKernel
|
|
{
|
|
/// <summary>
|
|
/// The legacy ERP treats the display name "管理员" as privileged in many
|
|
/// places. Agent operations require the exact built-in account identity so
|
|
/// a renamed or duplicate display-name account cannot inherit that bypass.
|
|
/// </summary>
|
|
public static class AdministratorIdentity
|
|
{
|
|
public const string BuiltInUserId = "1";
|
|
public const string BuiltInUserName = "管理员";
|
|
|
|
public static bool IsBuiltIn(string userId, string userName)
|
|
{
|
|
return string.Equals(
|
|
userId,
|
|
BuiltInUserId,
|
|
StringComparison.Ordinal)
|
|
&& string.Equals(
|
|
userName,
|
|
BuiltInUserName,
|
|
StringComparison.Ordinal);
|
|
}
|
|
}
|
|
}
|