private void LoginSuccess(int userId) { //设置用户的登录按钮权限 List <SYS_Action> actionList = userRole.GetAppUserActionList(userId, AppActionType.AllAction); if (actionList == null) { actionList = new List <SYS_Action>(); } AdminSystemInfo.UpdateActionList(actionList); //设置当前用户的角色信息 string errMsg = string.Empty; List <SYS_ROLE> roleList = userRole.GetAppUserRoleList(userId, ref errMsg); AdminSystemInfo.UpdateUserRoleList(roleList); }
/// <summary> /// 获取用户的指定菜单下按钮权限列表 /// </summary> /// <param name="actionNum"></param> /// <returns></returns> public JsonResult GetUserButtonAction(string actionNum) { //基本验证 if (string.IsNullOrEmpty(actionNum)) { return(Json(new { result = "error", message = "传入的权限编码为空" })); } List <SYS_Action> actionList = AdminSystemInfo.GetUserActionList(actionNum); return(Json(new { result = "ok", data = actionList, message = "查询成功" }, JsonRequestBehavior.AllowGet)); }