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

Add custom endpoint for listing user conditionally #3320

Merged
merged 4 commits into from
Feb 20, 2023
Merged

Add custom endpoint for listing user conditionally #3320

merged 4 commits into from
Feb 20, 2023

Conversation

JackyLiang522
Copy link
Contributor

What type of PR is this?

/kind bug

What this PR does / why we need it:

为后端用户管理提供更多筛选接口,包括关键词、角色、创建时间排序

Which issue(s) this PR fixes:

Fixes #3290

NONE

@f2c-ci-robot f2c-ci-robot bot added kind/bug Categorizes issue or PR as related to a bug. release-note-none Denotes a PR that doesn't merit a release note. labels Feb 15, 2023
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and LIlGG February 15, 2023 12:37
@JohnNiang
Copy link
Member

Hi @JustinLiang522 Thanks for your contribution!

Please note the check error before reviewing.

/retitle Add custom endpoint for listing user conditionally

@f2c-ci-robot f2c-ci-robot bot changed the title fix issue3290 Add custom endpoint for listing user conditionally Feb 16, 2023
@JohnNiang
Copy link
Member

/cc @halo-dev/sig-halo

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 17, 2023

@JohnNiang: GitHub didn't allow me to request PR reviews from the following users: halo-dev/sig-halo.

Note that only halo-dev members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @halo-dev/sig-halo

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ruibaby
Copy link
Member

ruibaby commented Feb 17, 2023

我今天将修改 Console 部分。

@ruibaby
Copy link
Member

ruibaby commented Feb 17, 2023

能否聚合返回用户的所有 Roles?

#3290 (comment)

@JackyLiang522
Copy link
Contributor Author

能否聚合返回用户的所有 Roles?

#3290 (comment)

那样的话我想添加一个RoleEndpoint文件,然后在里面处理Role的list请求,从而聚合返回用户的所有Role。这样做是否可以?

@ruibaby
Copy link
Member

ruibaby commented Feb 17, 2023

那样的话我想添加一个RoleEndpoint文件,然后在里面处理Role的list请求,从而聚合返回用户的所有Role。这样做是否可以?

/cc @halo-dev/sig-halo

重新想了一下,聚合 Role 似乎也可以不在这个 PR 做,可以合并之后再改动,因为 /apis/api.console.halo.run/v1alpha1/users/- 可能也得聚合 Role。

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 17, 2023

@ruibaby: GitHub didn't allow me to request PR reviews from the following users: halo-dev/sig-halo.

Note that only halo-dev members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

那样的话我想添加一个RoleEndpoint文件,然后在里面处理Role的list请求,从而聚合返回用户的所有Role。这样做是否可以?

/cc @halo-dev/sig-halo

重新想了一下,聚合 Role 似乎也可以不在这个 PR 做,可以合并之后再改动,因为 /apis/api.console.halo.run/v1alpha1/users/- 可能也得聚合 Role。

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ruibaby
Copy link
Member

ruibaby commented Feb 17, 2023

Console 已经在 halo-dev/console#862 适配,可以配合测试。

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Feb 19, 2023
@guqing
Copy link
Member

guqing commented Feb 19, 2023

能否聚合返回用户的所有 Roles?

#3290 (comment)

那样的话我想添加一个RoleEndpoint文件,然后在里面处理Role的list请求,从而聚合返回用户的所有Role。这样做是否可以?

目前为用户列表返回角色信息就是为了解决用户列表或用户登陆在没有角色查看权限时无法显示的问题 因此不太好通过 RoleEndpoint去做 直接在用户列表和登陆用户的 api 返回那些信息即可 不过此功能描述与该pr无关不再展开讨论

Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Feb 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 20, 2023
@f2c-ci-robot f2c-ci-robot bot merged commit 7c075dc into halo-dev:main Feb 20, 2023
f2c-ci-robot bot pushed a commit to halo-dev/console that referenced this pull request Feb 20, 2023
#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

用户管理列表支持条件筛选和排序,适配:halo-dev/halo#3320

#### Which issue(s) this PR fixes:

Fixes halo-dev/halo#3290

#### Screenshots:

<img width="922" alt="image" src="https://user-images.githubusercontent.com/21301288/219578426-de396dfb-7ece-496e-b740-d7a36321eafb.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev/halo#3320 分支。
2. Console 需要 `pnpm build:packages`
3. 测试用户管理的关键词、条件、排序筛选是否工作正常。

#### Does this PR introduce a user-facing change?

```release-note
Console 端的用户列表支持条件筛选和排序。
```
@JackyLiang522 JackyLiang522 deleted the issue3290 branch February 23, 2023 02:38
@ruibaby ruibaby added this to the 2.3.0 milestone Feb 24, 2023
JohnNiang pushed a commit to JohnNiang/halo that referenced this pull request Mar 2, 2023
…o-dev/console#862)

#### What type of PR is this?

/kind feature

#### What this PR does / why we need it:

用户管理列表支持条件筛选和排序,适配:halo-dev#3320

#### Which issue(s) this PR fixes:

Fixes halo-dev#3290

#### Screenshots:

<img width="922" alt="image" src="https://user-images.githubusercontent.com/21301288/219578426-de396dfb-7ece-496e-b740-d7a36321eafb.png">

#### Special notes for your reviewer:

测试方式:

1. Halo 需要切换到 halo-dev#3320 分支。
2. Console 需要 `pnpm build:packages`
3. 测试用户管理的关键词、条件、排序筛选是否工作正常。

#### Does this PR introduce a user-facing change?

```release-note
Console 端的用户列表支持条件筛选和排序。
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. lgtm Indicates that a PR is ready to be merged. release-note-none Denotes a PR that doesn't merit a release note.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

期望为 Console 端的用户管理单独提供接口以支持更多筛选条件
4 participants