using Furion; namespace Magic.Core; /// /// 用户管理 /// public static class UserManager { /// /// 用户id /// public static long UserId => long.Parse(App.User.FindFirst(ClaimConst.CLAINM_USERID)?.Value); /// /// 账号 /// public static string Account => App.User.FindFirst(ClaimConst.CLAINM_ACCOUNT)?.Value; /// /// 昵称 /// public static string Name => App.User.FindFirst(ClaimConst.CLAINM_NAME)?.Value; /// /// 是否超级管理员 /// public static bool IsSuperAdmin => App.User.FindFirst(ClaimConst.CLAINM_SUPERADMIN)?.Value == ((int)AdminType.SuperAdmin).ToString(); /// /// 是否租户管理员 /// public static bool IsTenantAdmin => App.User.FindFirst(ClaimConst.CLAINM_SUPERADMIN)?.Value == ((int)AdminType.Admin).ToString(); }