Skip to content

fix: mis管理系统用户个人信息页修改邮箱移除userId参数#1513

Open
OYX-1 wants to merge 5 commits intomasterfrom
fix-change-email-auth
Open

fix: mis管理系统用户个人信息页修改邮箱移除userId参数#1513
OYX-1 wants to merge 5 commits intomasterfrom
fix-change-email-auth

Conversation

@OYX-1
Copy link
Contributor

@OYX-1 OYX-1 commented Jan 27, 2026

No description provided.

@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: 7937d71

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@scow/mis-web Patch
@scow/auth Patch
@scow/gateway Patch
@scow/mis-server Patch
@scow/portal-server Patch
@scow/portal-web Patch
@scow/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkuhpc-review-bot pkuhpc-review-bot bot added the Code-ReviewRequested Code Review Requested label Jan 27, 2026
@pkuhpc-review-bot pkuhpc-review-bot bot requested a review from ddadaal January 27, 2026 03:22
Copy link

@pkuhpc-review-bot pkuhpc-review-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 将请求体中的 userIdnewEmail 提取从函数体移动到了认证逻辑之前。
  • 修改了 authenticate 函数的调用方式,传入了一个校验回调,用于验证传入的 userId 是否与当前用户的 identityId 一致。
  • 删除了原函数中重复的 userIdnewEmail 解构赋值。

@OYX-1 OYX-1 changed the title fix: mis管理系统用户修改邮箱增加校验权限 fix: mis管理系统用户个人信息页修改邮箱增加校验权限 Jan 27, 2026
@pkuhpc-review-bot pkuhpc-review-bot bot added Code-Approved Code Review approved ReadyForMerge Ready for merge and removed Code-ReviewRequested Code Review Requested labels Jan 27, 2026
Copy link

@pkuhpc-review-bot pkuhpc-review-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 移除了请求体中 userId 字段的定义,不再需要客户端传入 userId
  • 调整了认证逻辑,将原本基于 userId === info.identityId 的认证改为无条件通过(() => true)。
  • 从认证信息 info.identityId 中获取用户 ID,替代原来从请求体中读取的 userId
  • 修复了请求体解构赋值的变量顺序,并添加了空行以提升可读性。

Copy link

@pkuhpc-review-bot pkuhpc-review-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 移除了 changeEmail API 调用中的 userId 参数,现在仅传递 newEmail
  • 其他逻辑保持不变,包括表单验证、加载状态和 HTTP 错误处理。

Copy link

@pkuhpc-review-bot pkuhpc-review-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • newEmail 变量的解构位置从函数顶部移动到了 LDAP 权限检查之后。
  • 调整了代码格式,增加了空行以提升可读性。

@OYX-1 OYX-1 changed the title fix: mis管理系统用户个人信息页修改邮箱增加校验权限 fix: mis管理系统用户个人信息页修改邮箱移除userId参数 Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code-Approved Code Review approved ReadyForMerge Ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants