自主管理加分项
This commit is contained in:
@@ -30,10 +30,10 @@ namespace WebAPI.Filter
|
||||
if (lists.FirstOrDefault(x => x == strValues) != null)
|
||||
{
|
||||
isOk = true;
|
||||
isWithOut=true;
|
||||
isWithOut = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (!isOk && token != null)
|
||||
{
|
||||
var getUser = BLL.UserService.GetUserByUserId(token.FirstOrDefault());
|
||||
@@ -50,6 +50,10 @@ namespace WebAPI.Filter
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (token == null)
|
||||
{
|
||||
isOk = false;
|
||||
}
|
||||
//FormsAuthenticationTicket authTicket = null;
|
||||
//if (lists.FirstOrDefault(x => x == strValues) == null && auth!=null&&auth.Count()>0 && !string.IsNullOrEmpty(auth.FirstOrDefault()))
|
||||
//{
|
||||
@@ -69,7 +73,9 @@ namespace WebAPI.Filter
|
||||
//{
|
||||
// isOk = false;
|
||||
//}
|
||||
if (lists.FirstOrDefault(x => x == strValues) == null && actionContext.ActionDescriptor.ControllerDescriptor.ControllerName != "FileUpload" && !System.Web.HttpContext.Current.User.Identity.IsAuthenticated)
|
||||
|
||||
//&& !System.Web.HttpContext.Current.User.Identity.IsAuthenticated
|
||||
if (isOk && lists.FirstOrDefault(x => x == strValues) == null && actionContext.ActionDescriptor.ControllerDescriptor.ControllerName != "FileUpload")
|
||||
{
|
||||
isOk = false;
|
||||
actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.OK,
|
||||
@@ -86,7 +92,7 @@ namespace WebAPI.Filter
|
||||
IDictionary<string, object> arguments = actionContext.ActionArguments; // 获取参数
|
||||
foreach (KeyValuePair<string, object> item in arguments)
|
||||
{
|
||||
if (item.Key == "projectid" || item.Key == "ProjectId" || item.Key == "projectId" || item.Key == "Projectid")
|
||||
if (item.Key.ToLower() == "projectid")
|
||||
{
|
||||
var ProjectItems = APIProjectService.geProjectsByUserId(token.FirstOrDefault());
|
||||
List<string> projects = new List<string>();
|
||||
@@ -116,27 +122,27 @@ namespace WebAPI.Filter
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static List<string> lists = new List<string>
|
||||
{
|
||||
public static List<string> lists = new List<string>
|
||||
{
|
||||
"SY*SaveRisk",
|
||||
"SY*SaveEnvironmentProtection",
|
||||
"SY*SaveEnvironmentProtection",
|
||||
"SY*SaveLicence",
|
||||
"SY*SavePromise",
|
||||
"SY*SaveDataBase",
|
||||
"SY*SaveMajorHazard",
|
||||
"SY*SaveDataBase",
|
||||
"SY*SaveMajorHazard",
|
||||
"SY*SaveHiddenDangers",
|
||||
"HazardRealTime*SaveHazardRealTime",
|
||||
"upload*attendance",
|
||||
"upload*person",
|
||||
"User*postLoginOn",
|
||||
"HazardRealTime*SaveHazardRealTime",
|
||||
"upload*attendance",
|
||||
"upload*person",
|
||||
"User*postLoginOn",
|
||||
"Person*getPersonInOut",
|
||||
"Person*getUpdatePersonExchangeTime",
|
||||
"Person*getPersonDataExchange",
|
||||
"Person*getPersonByProjectIdIdentityCard",
|
||||
"Person*getAllPersonDataExchange",
|
||||
"Person*SaveSitePerson",
|
||||
"DoorService*getAttendance",
|
||||
"CommenInfo*FileUpload" ,
|
||||
"DoorService*getAttendance",
|
||||
"CommenInfo*FileUpload" ,
|
||||
"CNCECServer*PostGetCQMSData",
|
||||
"CNCECServer*PostGetCQMSData_CallBalk",
|
||||
"CNCECServer*PostGetHJGLData",
|
||||
@@ -145,23 +151,28 @@ namespace WebAPI.Filter
|
||||
"CNCECServer*PostGetHSSEData_CallBalk",
|
||||
"CNCECServer*PostGetSYHSEData",
|
||||
"CNCECServer*PostGetSYHSEData_CallBalk",
|
||||
"BaseInfo*getProjectPersonAndSafeHour",
|
||||
"BaseInfo*getProjectPersonAndSafeHour",
|
||||
"BaseInfo*getSafeHourFromLastAccident",
|
||||
"Unit*AddUnit",
|
||||
"BaseInfo*getSafeHourFromLastAccident",
|
||||
"BaseInfo*getSafeHourFromLastAccident",
|
||||
"HazardRegister*getHazardRegisterTotalCount",
|
||||
"Person*SaveAndUpdateSitePerson",
|
||||
"Person*addToBlack",
|
||||
"Person*addToBlack",
|
||||
"Person*getPersonData", "Person*getPersonInOutList",
|
||||
"Person*getPersonAllData",
|
||||
"HazardRegister*getHazardRegisterByProjectIdStates",
|
||||
"Person*getPersonPresenceData",
|
||||
"Vehicle*getVehicleDataExchange",
|
||||
"Vehicle*getUpdateVehicleExchangeTime",
|
||||
"Vehicle*getVehicleInOut",
|
||||
"Vehicle*getVehicleInOut",
|
||||
"Person*getPersonPresenceData",
|
||||
"User*getUserByProjectIdUnitIdQuery",
|
||||
"Environmental*AddMonitoring"
|
||||
"Environmental*AddMonitoring",
|
||||
"BonusScoreSelfManagement*getBonusScoreTypeList",
|
||||
"BonusScoreSelfManagement*getBonusScoreSelfManagementList",
|
||||
"BonusScoreSelfManagement*getBonusScoreSelfManagementById",
|
||||
"BonusScoreSelfManagement*saveBonusScoreSelfManagement",
|
||||
"BonusScoreSelfManagement*deleteBonusScoreSelfManagementById"
|
||||
|
||||
};
|
||||
|
||||
@@ -178,9 +189,9 @@ namespace WebAPI.Filter
|
||||
isOk = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (!isOk)
|
||||
{
|
||||
if (BLL.Funs.DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId))
|
||||
|
||||
Reference in New Issue
Block a user