From 9013e9095a8c65d51d51fcd0290727f626142a6f Mon Sep 17 00:00:00 2001 From: lhiven Date: Thu, 6 Mar 2025 16:02:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E7=94=A8=E6=88=B7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Rs.DeweyTester/Commom/GlobalUser.cs | 35 +++++++++++++++++++++++------ 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/Rs.DeweyTester/Commom/GlobalUser.cs b/Rs.DeweyTester/Commom/GlobalUser.cs index c6d9e38..806dbf3 100644 --- a/Rs.DeweyTester/Commom/GlobalUser.cs +++ b/Rs.DeweyTester/Commom/GlobalUser.cs @@ -9,10 +9,11 @@ namespace Rs.MotionPlat.Commom { public enum EUserLevel { - Op, - Engineer, - Vender, - Admin + OP, + AUDIT, + PM, + ENGINEER, + ADMIN } public class GlobalUser { @@ -29,7 +30,25 @@ namespace Rs.MotionPlat.Commom } public static bool IsOp() { - if (!string.IsNullOrEmpty(UserName) && UserName == "001") + if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.OP.ToString()) + { + return true; + } + return false; + } + + public static bool IsAudit() + { + if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.AUDIT.ToString()) + { + return true; + } + return false; + } + + public static bool IsPm() + { + if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.PM.ToString()) { return true; } @@ -38,15 +57,17 @@ namespace Rs.MotionPlat.Commom public static bool IsVender() { - if (!string.IsNullOrEmpty(UserName) && UserName == "002") + if (!string.IsNullOrEmpty(UserName) && UserName == EUserLevel.ENGINEER.ToString()) { return true; } return false; } + + public static bool IsSuper() { - if(!string.IsNullOrEmpty(UserName) && UserName=="003") + if(!string.IsNullOrEmpty(UserName) && UserName== EUserLevel.ADMIN.ToString()) { return true; }