jojo/templates
Ryan Lerch 027fd3658a feat: Add admin individual user email management endpoints (#9594)
**AI Disclosure:** This work was produced with the assistance of an artificial intelligence tool

## feat: Add admin endpoints for individual user email management
Add GET and DELETE endpoints at `/admin/users/{username}/emails` to allow
administrators to list and delete individual email addresses for users.

These API endpoints provide programmatic access to functionality that is
currently only available through the web UI:
- http://forgejo.example/admin/emails (delete individual email addresses)
- http://forgejo.example/admin/users/1 (view individual user's emails)

The new endpoints follow existing admin API naming patterns such as
`/admin/users/{username}/keys`, `/admin/users/{username}/orgs`, and
`/admin/users/{username}/quota`, providing consistent resource management
under the `/admin/users/{username}` namespace.

This complements the existing `/admin/emails` endpoint which lists all emails
across all users, providing administrators with granular control over
individual user email management.

## Checklist

The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org).

### Tests

- I added test coverage for Go changes...
  - [ ] in their respective `*_test.go` for unit tests.
  - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server.
- I added test coverage for JavaScript changes...
  - [ ] in `web_src/js/*.test.js` if it can be unit tested.
  - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)).

### Documentation

- [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change.
- [x] I did not document these changes and I do not expect someone else to do it.

### Release notes

- [ ] I do not want this change to show in the release notes.
- [x] I want the title to show in the release notes with a link to this pull request.
- [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9594
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org>
Co-authored-by: Ryan Lerch <rlerch@redhat.com>
Co-committed-by: Ryan Lerch <rlerch@redhat.com>
2025-10-28 15:52:37 +01:00
..
admin feat(ui): improve new buttons, use in more areas (#9863) 2025-10-28 00:10:38 +01:00
api/packages/pypi Update templates/api/packages/pypi/simple.tmpl 2024-04-12 16:43:30 +00:00
base feat: move more modals to native dialogs (#9636) 2025-10-13 17:48:49 +02:00
custom [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
devtest feat(ui): dangerous buttons (#9652) 2025-10-20 12:03:17 +02:00
explore feat: improve tooltips and aria-labels of stars/forks/watchers links (#9754) 2025-10-19 18:33:26 +02:00
htmx fix(ui): Make 'Clear milestone' work with HTMX (#8266) 2025-08-11 20:10:10 +02:00
mail fix: release email links (#9690) 2025-10-16 16:12:32 +02:00
moderation feat!: Abusive content reporting (#6977) 2025-05-18 08:05:16 +00:00
org feat: migrate add/remove repositories in team to native dialog (#9877) 2025-10-28 14:29:34 +01:00
package docs: don't suggest setting default cargo registry (#9834) 2025-10-25 04:11:27 +02:00
projects fix(ui): add markup class to project descriptions (#9634) 2025-10-11 11:19:33 +02:00
repo feat(ui): improve new buttons, use in more areas (#9863) 2025-10-28 00:10:38 +01:00
shared fix: avoid jumping to begin of page on edit comment action (#9645) 2025-10-13 17:46:35 +02:00
status fix(ui): remove extra helpers from statuspages (#9753) 2025-10-20 12:03:58 +02:00
swagger feat: Add admin individual user email management endpoints (#9594) 2025-10-28 15:52:37 +01:00
user feat(ui): improve new buttons, use in more areas (#9863) 2025-10-28 00:10:38 +01:00
webhook feat: require data-modal-id for delete buttons (#8711) 2025-08-08 01:53:23 +02:00
home.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
home_forgejo.tmpl Split Forgejo landing page template to allow patching or removing Forgejo introduction section (#6675) 2025-02-03 08:41:52 +00:00
install.tmpl Added alt's to <img> 2025-01-31 21:22:00 +00:00
post-install.tmpl [BRANDING] Custom loading animation for Forgejo 2024-02-05 16:02:13 +01:00