dao преди 1 седмица
родител
ревизия
d3b0737874
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. +6
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs

+ 6
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Controllers/LoginController.cs Целия файл

@@ -26,6 +26,7 @@ using Learun.Application.TwoDevelopment.PersonnelManagement;
using Learun.Application.TwoDevelopment.Permission;
using DotNetCasClient;
using DotNetCasClient.Configuration;
using Learun.Loger;

namespace Learun.Application.Web.Controllers
{
@@ -196,9 +197,10 @@ namespace Learun.Application.Web.Controllers
public ActionResult Index()
{
#region CAS
if (User.Identity.IsAuthenticated)
{

string uid = User.Identity.Name; // 获取用户ID
if (!string.IsNullOrEmpty(uid))
{
@@ -227,6 +229,7 @@ namespace Learun.Application.Web.Controllers
return Fail("系统无此用户,请先同步用户数据!");
}
}

CasAuthentication.RedirectToLoginPage();
//LogHelper.WriteToLog("cas登录", $"无登录信息{Request.UrlReferrer}");
//LogHelper.WriteToLog("cas登录", $"信息{User.Identity.Name}");
@@ -272,6 +275,7 @@ namespace Learun.Application.Web.Controllers
////Response.Redirect(loginUrl);
//return Redirect(loginUrl);
#endregion
#region

//string ticket = Request.QueryString["ticket"];
//string serviceUrl = DotNetCasClient.Configuration.CasClientConfiguration.CAS_SERVER_LOGIN_URL;
@@ -389,6 +393,7 @@ namespace Learun.Application.Web.Controllers
// default:
// return View("Default"); // 经典版本
//}
#endregion
return Fail("userinfo is null");
}



Зареждане…
Отказ
Запис