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

feat(auth): 认证系统获取用户接口增加返回用户姓名和邮箱 #591

Merged
merged 1 commit into from
Apr 25, 2023

Conversation

ddadaal
Copy link
Member

@ddadaal ddadaal commented Apr 25, 2023

认证系统接口GET /user接口增加返回用户的姓名(name)和邮箱(mail)信息。两个字段均为可选。现有认证系统应在GET /user接口中增加这两个字段。

  • 在默认的LDAP实现中,name和mail将会分别从用户的节点的ldap.attrs.name指定的属性和ldap.attrs.mail指定的属性中取到。
  • 在默认的SSH实现中,name将会是用户的Gecos field中指定的full name,mail字段一直为undefined。

@changeset-bot
Copy link

changeset-bot bot commented Apr 25, 2023

🦋 Changeset detected

Latest commit: cafbc90

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

This PR includes changesets to release 9 packages
Name Type
@scow/auth Minor
@scow/lib-auth Minor
@scow/docs Minor
@scow/mis-server Minor
@scow/mis-web Minor
@scow/portal-web Minor
@scow/gateway Minor
@scow/portal-server Minor
@scow/cli Minor

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

@github-actions
Copy link
Contributor

github-actions bot commented Apr 25, 2023

PR Preview Action bb9d9bb
Preview removed because the pull request was closed.
2023-04-25 13:11 UTC

@codecov
Copy link

codecov bot commented Apr 25, 2023

Codecov Report

Patch coverage: 80.00% and project coverage change: -0.01 ⚠️

Comparison is base (0b04138) 66.99% compared to head (cafbc90) 66.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
- Coverage   66.99%   66.99%   -0.01%     
==========================================
  Files         119      119              
  Lines        3306     3309       +3     
  Branches      432      434       +2     
==========================================
+ Hits         2215     2217       +2     
  Misses       1032     1032              
- Partials       59       60       +1     
Impacted Files Coverage Δ
libs/auth/src/getUser.ts 85.71% <ø> (ø)
apps/auth/src/auth/ldap/helpers.ts 63.93% <33.33%> (-1.07%) ⬇️
apps/auth/src/auth/ssh/index.ts 73.33% <100.00%> (+1.90%) ⬆️
apps/auth/src/routes/getUser.ts 84.61% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ddadaal ddadaal merged commit bb9d9bb into master Apr 25, 2023
@ddadaal ddadaal deleted the auth-get-user-return-name-mail branch April 25, 2023 13:09
ddadaal added a commit that referenced this pull request Apr 28, 2023
#591
支持了从认证系统中获取用户姓名。这个PR使在门户和管理系统登录后,显示在网页右上角的用户姓名为从认证系统中获取的用户姓名。如果从认证系统中获取不到用户名,则使用用户的ID显示。

在一个LDAP的集群中的测试方法:

1. 登录门户系统,查看登录后右上角显示的用户姓名是否为LDAP里用户的姓名
2.
修改管理系统数据库,在`user`表中将一个用户的姓名列修改为其他的,然后登录管理系统,查看登录后右上角显示的用户姓名是否为LDAP里用户的姓名
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant