Skip to content

feat: add support for disabling/enabling user accounts #7273

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

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

ruibaby
Copy link
Member

@ruibaby ruibaby commented Mar 7, 2025

What type of PR is this?

/kind feature
/area ui
/milestone 2.20.x

What this PR does / why we need it:

Add support for disabling/enabling user accounts

image

Which issue(s) this PR fixes:

Fixes #7250

Special notes for your reviewer:

Does this PR introduce a user-facing change?

支持在管理控制台禁用指定用户

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 7, 2025
@f2c-ci-robot f2c-ci-robot bot added this to the 2.20.x milestone Mar 7, 2025
@f2c-ci-robot f2c-ci-robot bot added the area/ui Issues or PRs related to the Halo UI label Mar 7, 2025
@f2c-ci-robot f2c-ci-robot bot requested review from guqing and LIlGG March 7, 2025 04:43
@ruibaby
Copy link
Member Author

ruibaby commented Mar 7, 2025

@halo-dev/sig-halo

Backend adaptations may be required to address the following issues:

  1. Disabled users cannot log in, but there is no error message displayed.

    image
  2. If a disabled user is already logged in, they can continue to operate even after being disabled.

  3. The ⁠spec.disabled field in the User extension lacks an index, making it impossible to filter disabled users effectively.

@ruibaby ruibaby changed the title feat: add supports for disable user accounts WIP: feat: add supports for disable user accounts Mar 7, 2025
@f2c-ci-robot f2c-ci-robot bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 7, 2025
@ruibaby ruibaby requested a review from JohnNiang March 7, 2025 04:48
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 50.63291% with 39 lines in your changes missing coverage. Please review.

Project coverage is 57.10%. Comparing base (eff73dc) to head (c92c661).
Report is 110 commits behind head on main.

Files with missing lines Patch % Lines
...app/core/endpoint/console/ConsoleUserEndpoint.java 68.62% 16 Missing ⚠️
...lo/app/core/user/service/impl/UserServiceImpl.java 0.00% 11 Missing ⚠️
...un/halo/app/security/device/DeviceServiceImpl.java 0.00% 9 Missing ⚠️
.../authentication/login/UsernamePasswordHandler.java 0.00% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7273      +/-   ##
============================================
+ Coverage     56.99%   57.10%   +0.10%     
- Complexity     3999     4062      +63     
============================================
  Files           714      722       +8     
  Lines         24110    24552     +442     
  Branches       1585     1614      +29     
============================================
+ Hits          13742    14020     +278     
- Misses         9756     9908     +152     
- Partials        612      624      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@JohnNiang JohnNiang changed the title WIP: feat: add supports for disable user accounts WIP: feat: add supports for disabling user accounts Mar 7, 2025
@JohnNiang
Copy link
Member

#7273 (comment)

I will try to inspect this situation.

Copy link

pkg-pr-new bot commented Mar 10, 2025

Open in Stackblitz

@halo-dev/api-client

npm i https://pkg.pr.new/@halo-dev/api-client@7273

@halo-dev/components

npm i https://pkg.pr.new/@halo-dev/components@7273

@halo-dev/console-shared

npm i https://pkg.pr.new/@halo-dev/console-shared@7273

@halo-dev/ui-plugin-bundler-kit

npm i https://pkg.pr.new/@halo-dev/ui-plugin-bundler-kit@7273

@halo-dev/richtext-editor

npm i https://pkg.pr.new/@halo-dev/richtext-editor@7273

commit: f06156a

@ruibaby ruibaby changed the title WIP: feat: add supports for disabling user accounts feat: add supports for disabling user accounts Mar 10, 2025
@f2c-ci-robot f2c-ci-robot bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 10, 2025
Copy link

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.

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Mar 10, 2025
Copy link

f2c-ci-robot bot commented Mar 10, 2025

[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

@JohnNiang JohnNiang changed the title feat: add supports for disabling user accounts feat: add support for disabling user accounts Mar 10, 2025
@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 Mar 10, 2025
@JohnNiang JohnNiang changed the title feat: add support for disabling user accounts feat: add support for disabling/enabling user accounts Mar 10, 2025
@f2c-ci-robot f2c-ci-robot bot merged commit 4ad97cd into halo-dev:main Mar 10, 2025
11 checks passed
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. area/ui Issues or PRs related to the Halo UI kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

用户账号封禁功能
2 participants