public static void GetPermission() { if (EnablePermission) { //未获取,或者不是同一个人,或者不是同一个应用,则从权限中心获取 if (Wanda.Platform.Permission.ClientComponent.PermissionCenterProxy.GetPCDataStatus() == Wanda.Platform.Permission.ClientComponent.PermissionCenterDataStatus.NotReady || GetCurrentUser != PermissionCenterProxy.GetUserLoginName() || PCClientIdentity.CurrentApplicationCode != PermissionCenterProxy.GetApplicationCode() ) { try { PermissionCenterProxy.GetPermission(); NLogHelper.Log.Info(string.Format("{0} {1} GetPermission", PermissionCenterProxy.GetUserLoginName(), DateTime.Now.ToString()), NLogHelper.MakeLogObj(NLogHelper.BusinessID_Const, PermissionCenterProxy.GetUserLoginName()), NLogHelper.MakeLogObj(NLogHelper.MethodName_Const, "GetPermission"), NLogHelper.MakeLogObj(NLogHelper.BizAppCode_Const, "ZCPT") ); } catch (Exception e) { NLogHelper.Log.Error(e.ToString(), NLogHelper.MakeLogObj(NLogHelper.BusinessID_Const, PermissionCenterProxy.GetUserLoginName()), NLogHelper.MakeLogObj(NLogHelper.MethodName_Const, "GetPermission"), NLogHelper.MakeLogObj(NLogHelper.BizAppCode_Const, "ZCPT") ); } } } }
public static List <FunctionalAuthorityResult> GetFuncPermission() { if (EnablePermission) { return(PermissionCenterProxy.GetFuncPermission()); } else { return(null); } }
/// <summary> /// 用于获取操作日志 /// </summary> /// <returns></returns> public static List <string> Getsubmanage() { //如果要搬走请把GetPermission() 方法也拷走 if (EnablePermission) { return(PermissionCenterProxy.GetUserProperties().Where(p => p.PropertyCode == "submanage").Select(p => p.PropertyValue).ToList()); } else { return(null); } }