[PR #1128] [CLOSED] Allow server admins to reset internal user passwords #9228

Closed
opened 2026-04-30 05:29:51 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/1128
Author: @adrianeastles
Created: 7/25/2025
Status: Closed

Base: devHead: feature/admin-reset-user-password


📝 Commits (4)

  • d664eb2 - Add API endpoint POST /admin/user/{userId}/password for server admins
  • 41054cd Fixed dark mode issue
  • c588128 Aligned password reset time with current standards in other places.
  • 87da1eb Added password reset functionality to API keys

📊 Changes

9 files changed (+497 additions, -0 deletions)

View changed files

📝 messages/en-US.json (+9 -0)
📝 server/auth/actions.ts (+1 -0)
📝 server/routers/external.ts (+5 -0)
📝 server/routers/integration.ts (+7 -0)
server/routers/user/adminResetUserPassword.ts (+212 -0)
📝 server/routers/user/index.ts (+1 -0)
📝 src/app/admin/users/[userId]/general/page.tsx (+29 -0)
src/components/AdminPasswordReset.tsx (+232 -0)
📝 src/components/PermissionsSelectBox.tsx (+1 -0)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

This introduces essential administrative capabilities for user account management. Server administrators can now reset passwords for internal users through a new password reset feature in the admin interface. The implementation includes a dedicated API endpoint for secure password reset operations, enhanced backend logic for password generation and validation, and updated frontend components in the admin user management table.

How to test?

  1. Navigate to Admin Interface

    • Go to AdminUsers
    • Locate an internal user in the users table
  2. Initiate Password Reset

    • Click on the user row to open user details
    • Click the "Reset Password" button
    • Confirm the action in the dialog that appears
  3. Handle Password Reset

    • If SMTP is enabled: Check the user's email for the password reset link
    • If SMTP is disabled: The password reset link will be displayed on screen for you to copy
    • Use the provided link to access the password reset page
    • Enter a new password and confirm it
  4. Verify Success

    • Confirm the password reset was successful
    • Test logging in with the new password
    • Verify the old password no longer works

Screenshots

Screenshot 2025-07-25 at 8 54 05 pm Screenshot 2025-07-25 at 8 54 10 pm Screenshot 2025-07-25 at 8 54 15 pm

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/fosrl/pangolin/pull/1128 **Author:** [@adrianeastles](https://github.com/adrianeastles) **Created:** 7/25/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `feature/admin-reset-user-password` --- ### 📝 Commits (4) - [`d664eb2`](https://github.com/fosrl/pangolin/commit/d664eb2a8d48075b6629eeeb67e6cea0bb2f21d3) - Add API endpoint POST /admin/user/{userId}/password for server admins - [`41054cd`](https://github.com/fosrl/pangolin/commit/41054cd46224f7b9a4b62e0e3d425f2b608fb99f) Fixed dark mode issue - [`c588128`](https://github.com/fosrl/pangolin/commit/c58812851118731306a2b1565d64a7c1c1b23b21) Aligned password reset time with current standards in other places. - [`87da1eb`](https://github.com/fosrl/pangolin/commit/87da1ebe15d711208be4b465de0f3c71525d0aee) Added password reset functionality to API keys ### 📊 Changes **9 files changed** (+497 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `messages/en-US.json` (+9 -0) 📝 `server/auth/actions.ts` (+1 -0) 📝 `server/routers/external.ts` (+5 -0) 📝 `server/routers/integration.ts` (+7 -0) ➕ `server/routers/user/adminResetUserPassword.ts` (+212 -0) 📝 `server/routers/user/index.ts` (+1 -0) 📝 `src/app/admin/users/[userId]/general/page.tsx` (+29 -0) ➕ `src/components/AdminPasswordReset.tsx` (+232 -0) 📝 `src/components/PermissionsSelectBox.tsx` (+1 -0) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description This introduces essential administrative capabilities for user account management. Server administrators can now reset passwords for internal users through a new password reset feature in the admin interface. The implementation includes a dedicated API endpoint for secure password reset operations, enhanced backend logic for password generation and validation, and updated frontend components in the admin user management table. ## How to test? 1. **Navigate to Admin Interface** - Go to **Admin** → **Users** - Locate an internal user in the users table 2. **Initiate Password Reset** - Click on the user row to open user details - Click the **"Reset Password"** button - Confirm the action in the dialog that appears 3. **Handle Password Reset** - **If SMTP is enabled**: Check the user's email for the password reset link - **If SMTP is disabled**: The password reset link will be displayed on screen for you to copy - Use the provided link to access the password reset page - Enter a new password and confirm it 4. **Verify Success** - Confirm the password reset was successful - Test logging in with the new password - Verify the old password no longer works ## Screenshots <img width="1340" height="721" alt="Screenshot 2025-07-25 at 8 54 05 pm" src="https://github.com/user-attachments/assets/3e7ec038-79ab-4b7c-baf5-616e12c16dc2" /> <img width="647" height="337" alt="Screenshot 2025-07-25 at 8 54 10 pm" src="https://github.com/user-attachments/assets/4160b08f-11c1-4e57-90b8-b68a3a3f78b3" /> <img width="627" height="328" alt="Screenshot 2025-07-25 at 8 54 15 pm" src="https://github.com/user-attachments/assets/dd987b2c-1f82-4e31-95f6-8a8b12540954" /> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-30 05:29:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#9228