Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: can't update user info to db , fix issue:#7141 #7252

Merged
merged 1 commit into from
Nov 24, 2021

Conversation

MisterChangRay
Copy link
Contributor

@MisterChangRay MisterChangRay commented Nov 18, 2021

Please do not create a Pull Request without creating an issue first.

What is the purpose of the change

修复 #7141 的问题

后台管理系统登录后, 在NacosAuthManager.login 方法中, 将登录的用户信息存于 HttpServletRequest.setAttribute 。
此种方式在ajax异步请求时, RequestUtil.getUser不能成功的访问到用户信息, 从而不能记录用户更新信息
更换为 req.getSession().setAttribute

Brief changelog

将用户数据从 HttpServletRequest 中迁移到 HttpSession 中进行保存

Verifying this change

已验证在修改和删除时能成功记录

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in test module.
  • Run mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true to make sure basic checks pass. Run mvn clean install -DskipITs to make sure unit-test pass. Run mvn clean test-compile failsafe:integration-test to make sure integration-test pass.

@MisterChangRay MisterChangRay changed the title fix: 在请求中保存用户信息到 httpsession 修复issue:#7141 fix: can't save update user info to db , fix issue:#7141 Nov 18, 2021
@MisterChangRay MisterChangRay changed the title fix: can't save update user info to db , fix issue:#7141 fix: can't update user info to db , fix issue:#7141 Nov 18, 2021
@KomachiSion KomachiSion merged commit d05dff5 into alibaba:develop Nov 24, 2021
@KomachiSion KomachiSion added the kind/enhancement Category issues or prs related to enhancement. label Nov 24, 2021
@KomachiSion KomachiSion added this to the 2.1.0 milestone Nov 24, 2021
@MisterChangRay MisterChangRay deleted the hotfix_issus_7141 branch November 24, 2021 08:32
zrlw added a commit to zrlw/nacos that referenced this pull request Jan 9, 2022
zrlw added a commit to zrlw/nacos that referenced this pull request Feb 21, 2022
CherishCai pushed a commit to CherishCai/nacos that referenced this pull request Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Category issues or prs related to enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants