|
|
@@ -23,29 +23,29 @@ namespace CallCenterApi.Interface
|
|
23
|
23
|
|
|
24
|
24
|
if (filterContext.RequestContext.HttpContext.Request.IsAuthenticated)
|
|
25
|
25
|
{
|
|
26
|
|
- var actionDescriptor = filterContext.ActionDescriptor;
|
|
27
|
|
- var controllerDescriptor = actionDescriptor.ControllerDescriptor;
|
|
28
|
|
- var controller = controllerDescriptor.ControllerName;
|
|
29
|
|
- var action = actionDescriptor.ActionName;
|
|
30
|
|
- var token = filterContext.HttpContext.Request["token"];
|
|
|
26
|
+ //var actionDescriptor = filterContext.ActionDescriptor;
|
|
|
27
|
+ //var controllerDescriptor = actionDescriptor.ControllerDescriptor;
|
|
|
28
|
+ //var controller = controllerDescriptor.ControllerName;
|
|
|
29
|
+ //var action = actionDescriptor.ActionName;
|
|
|
30
|
+ //var token = filterContext.HttpContext.Request["token"];
|
|
31
|
31
|
|
|
32
|
|
- var userData = CacheHelper.Get<Cache.Models.CurrentUserInfo>(token);
|
|
33
|
|
- var roleId = userData.F_RoleId;
|
|
34
|
|
- var role = new BLL.T_Sys_RoleInfo().GetModel(roleId);
|
|
35
|
|
- if (role != null)
|
|
36
|
|
- {
|
|
37
|
|
- var roleFunctionList = roleFunctionBLL.DataTableToList(roleFunctionBLL.GetList(" F_RoleId=" + role.F_RoleId).Tables[0]);
|
|
38
|
|
- //var str = string.Join(",", roleFunctionList.Select(x => x.F_FunctionId).ToArray());
|
|
39
|
|
- var moduleFunction = new BLL.T_Sys_ModuleFunctions().GetModel(controller, action);
|
|
40
|
|
- if (moduleFunction != null)
|
|
41
|
|
- {
|
|
42
|
|
- var single = roleFunctionList.SingleOrDefault(x => x.F_FunctionId == moduleFunction.F_FunctionId);
|
|
43
|
|
- if (single != null)
|
|
44
|
|
- {
|
|
45
|
|
- isAuth = true;
|
|
46
|
|
- }
|
|
47
|
|
- }
|
|
48
|
|
- }
|
|
|
32
|
+ //var userData = CacheHelper.Get<Cache.Models.CurrentUserInfo>(token);
|
|
|
33
|
+ //var roleId = userData.F_RoleId;
|
|
|
34
|
+ //var role = new BLL.T_Sys_RoleInfo().GetModel(roleId);
|
|
|
35
|
+ //if (role != null)
|
|
|
36
|
+ //{
|
|
|
37
|
+ // var roleFunctionList = roleFunctionBLL.DataTableToList(roleFunctionBLL.GetList(" F_RoleId=" + role.F_RoleId).Tables[0]);
|
|
|
38
|
+ // //var str = string.Join(",", roleFunctionList.Select(x => x.F_FunctionId).ToArray());
|
|
|
39
|
+ // var moduleFunction = new BLL.T_Sys_ModuleFunctions().GetModel(controller, action);
|
|
|
40
|
+ // if (moduleFunction != null)
|
|
|
41
|
+ // {
|
|
|
42
|
+ // var single = roleFunctionList.SingleOrDefault(x => x.F_FunctionId == moduleFunction.F_FunctionId);
|
|
|
43
|
+ // if (single != null)
|
|
|
44
|
+ // {
|
|
|
45
|
+ // isAuth = true;
|
|
|
46
|
+ // }
|
|
|
47
|
+ // }
|
|
|
48
|
+ //}
|
|
49
|
49
|
}
|
|
50
|
50
|
else
|
|
51
|
51
|
{
|