Skip to content

feat: add admin user management and in-app system guide - #1

Open
douzhenyu wants to merge 1 commit into
mainfrom
feature/system-guide-samples
Open

feat: add admin user management and in-app system guide#1
douzhenyu wants to merge 1 commit into
mainfrom
feature/system-guide-samples

Conversation

@douzhenyu

Copy link
Copy Markdown
Collaborator

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

N/A

What this PR does / why we need it:

This PR adds role-based authentication and an in-app system guide so accounts can be centrally managed and users can quickly learn and try the system.

Administrator and user management

  • Adds administrator and regular-user roles and disables public registration.
  • Synchronizes one fixed administrator account at startup. The default credentials are:
    • Username: admin
    • Password: User@123
  • Supports overriding the administrator credentials with ADMIN_USERNAME and ADMIN_PASSWORD. Production deployments should replace the default password.
  • Adds administrator-only user management APIs and UI for creating users, enabling/disabling accounts, setting expiration dates, maintaining remarks, and resetting passwords.
  • Prevents regular users from viewing or calling user-management features while retaining access to existing business functionality.
  • Revalidates account status on authenticated requests and invalidates existing sessions after disablement, expiration, or password reset.
  • Improves the shared login experience with password visibility, loading/error states, and centralized-account guidance.

System guide and sample files

Validation

  • go test ./... passed.
  • npm run build passed.
  • Targeted ESLint checks for the new authentication, guide, user-management, and API files passed.
  • The repository-wide npm run lint still reports 53 errors and 4 warnings in pre-existing files outside this PR's new feature scope.

@douzhenyu
douzhenyu marked this pull request as ready for review August 7, 2026 02:52
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.

1 participant