This website requires JavaScript.

feat(admin): Add option to delete user from the user's page #13554

Open
famfo-cb wants to merge 1 commit from famfo-cb/admin-delete into forgejo AGit
Member

Admins may be sent the URL to an abusive profile. Instead of manually
going back to the admin user list and searching for the user, this
enables them to directly delete users from their profile view.

This is a port of:
Codeberg-Infrastructure/forgejo@d119860a6f

Release notes

  • Features
    • PR: feat(admin): Add option to delete user from the user's page
Admins may be sent the URL to an abusive profile. Instead of manually going back to the admin user list and searching for the user, this enables them to directly delete users from their profile view. This is a port of: https://codeberg.org/Codeberg-Infrastructure/forgejo/commit/d119860a6fad707785fea434386841d5c64835c5 <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Features - [PR](https://codeberg.org/forgejo/forgejo/pulls/13554): <!--number 13554 --><!--line 0 --><!--description ZmVhdChhZG1pbik6IEFkZCBvcHRpb24gdG8gZGVsZXRlIHVzZXIgZnJvbSB0aGUgdXNlcidzIHBhZ2U=-->feat(admin): Add option to delete user from the user's page<!--description--> <!--end release-notes-assistant-->
feat(admin): Add option to delete user from the user's page
Some checks failed
testing / semgrep/ci (pull_request) Successful in 14s
testing / frontend-checks (pull_request) Successful in 53s
testing / backend-checks (pull_request) Successful in 3m17s
testing / test-remote-cacher (valkey) (pull_request) Has been skipped
testing / test-remote-cacher (garnet) (pull_request) Has been skipped
testing / test-e2e (pull_request) Successful in 22m54s
testing / test-mysql (pull_request) Successful in 24m46s
testing / test-sqlite (pull_request) Successful in 41m41s
testing / test-pgsql (pull_request) Successful in 45m32s
issue-labels / backporting (pull_request_target) Has been skipped
issue-labels / cascade (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 23s
requirements / merge-conditions (pull_request) Failing after 14s
testing / test-unit (pull_request) Successful in 5m41s
testing / test-remote-cacher (redis) (pull_request) Successful in 4m10s
testing / security-check (pull_request) Successful in 6m3s
1681fdcd18
Admins may be sent the URL to an abusive profile. Instead of manually
going back to the admin user list and searching for the user, this
enables them to directly delete users from their profile view.

This is a port of:
d119860a6f
@ -92,2 +92,4 @@
</div>
{{if $.IsAdmin}}
<div class="ui g-modal-confirm delete modal" id="delete-user">
Owner

This is a old dialog modal. Also probably best if there's a single template for this. As it's and should be the same as the one in the admin page.

This is a old dialog modal. Also probably best if there's a single template for this. As it's and should be the same as the one in the admin page.
@ -76,9 +76,17 @@ func TestAdminViewUser(t *testing.T) {
req := NewRequest(t, "GET", "/admin/users/1")
Owner

Would say this also deserves a E2E test merely to confirm:

  1. modal opens
  2. pressing delete indeed deletes the user and redirects to /admin/... page.
Would say this also deserves a E2E test merely to confirm: 1. modal opens 2. pressing delete indeed deletes the user and redirects to `/admin/...` page.
Owner

CI failure unrelated, likely flaky but haven't seen this one before.

CI failure unrelated, likely flaky but haven't seen this one before.
Where does that come from? The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/13554.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference.

This message and the release notes originate from a call to the release-notes-assistant.

@@ -5,2 +5,10 @@
 This is a port of:
 https://codeberg.org/Codeberg-Infrastructure/forgejo/commit/d119860a6fad707785fea434386841d5c64835c5
+
+<!--start release-notes-assistant-->
+
+## Release notes
+<!--URL:https://codeberg.org/forgejo/forgejo-->
+- Features
+  - [PR](https://codeberg.org/forgejo/forgejo/pulls/13554): <!--number 13554 --><!--line 0 --><!--description ZmVhdChhZG1pbik6IEFkZCBvcHRpb24gdG8gZGVsZXRlIHVzZXIgZnJvbSB0aGUgdXNlcidzIHBhZ2U=-->feat(admin): Add option to delete user from the user's page<!--description-->
+<!--end release-notes-assistant-->

Release notes

  • Features
    • PR: feat(admin): Add option to delete user from the user's page
<details> <summary>Where does that come from?</summary> The following is a preview of the release notes for this pull request, as they will appear in the upcoming release. They are derived from the content of the `release-notes/13554.md` file, if it exists, or the title of the pull request. They were also added at the bottom of the description of this pull request for easier reference. This message and the release notes originate from a call to the [release-notes-assistant](https://code.forgejo.org/forgejo/release-notes-assistant). ```diff @@ -5,2 +5,10 @@ This is a port of: https://codeberg.org/Codeberg-Infrastructure/forgejo/commit/d119860a6fad707785fea434386841d5c64835c5 + +<!--start release-notes-assistant--> + +## Release notes +<!--URL:https://codeberg.org/forgejo/forgejo--> +- Features + - [PR](https://codeberg.org/forgejo/forgejo/pulls/13554): <!--number 13554 --><!--line 0 --><!--description ZmVhdChhZG1pbik6IEFkZCBvcHRpb24gdG8gZGVsZXRlIHVzZXIgZnJvbSB0aGUgdXNlcidzIHBhZ2U=-->feat(admin): Add option to delete user from the user's page<!--description--> +<!--end release-notes-assistant--> ``` </details> <!--start release-notes-assistant--> ## Release notes <!--URL:https://codeberg.org/forgejo/forgejo--> - Features - [PR](https://codeberg.org/forgejo/forgejo/pulls/13554): <!--number 13554 --><!--line 0 --><!--description ZmVhdChhZG1pbik6IEFkZCBvcHRpb24gdG8gZGVsZXRlIHVzZXIgZnJvbSB0aGUgdXNlcidzIHBhZ2U=-->feat(admin): Add option to delete user from the user's page<!--description--> <!--end release-notes-assistant-->
Some checks failed
testing / semgrep/ci (pull_request) Successful in 14s
testing / frontend-checks (pull_request) Successful in 53s
Required
Details
testing / backend-checks (pull_request) Successful in 3m17s
Required
Details
testing / test-remote-cacher (valkey) (pull_request) Has been skipped
testing / test-remote-cacher (garnet) (pull_request) Has been skipped
testing / test-e2e (pull_request) Successful in 22m54s
testing / test-mysql (pull_request) Successful in 24m46s
Required
Details
testing / test-sqlite (pull_request) Successful in 41m41s
Required
Details
testing / test-pgsql (pull_request) Successful in 45m32s
Required
Details
issue-labels / backporting (pull_request_target) Has been skipped
issue-labels / cascade (pull_request_target) Has been skipped
issue-labels / release-notes (pull_request_target) Successful in 23s
requirements / merge-conditions (pull_request) Failing after 14s
testing / test-unit (pull_request) Successful in 5m41s
Required
Details
testing / test-remote-cacher (redis) (pull_request) Successful in 4m10s
testing / security-check (pull_request) Successful in 6m3s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin +refs/pull/13554/head:famfo-cb/admin-delete
git switch famfo-cb/admin-delete
Sign in to join this conversation.
No reviewers
No labels
arch
riscv64
backport/v1.19
backport/v1.20
backport/v1.21/forgejo
backport/v10.0/forgejo
backport/v11.0/forgejo
backport/v12.0/forgejo
backport/v13.0/forgejo
backport/v14.0/forgejo
backport/v15.0/forgejo
backport/v16.0/forgejo
backport/v7.0/forgejo
backport/v8.0/forgejo
backport/v9.0/forgejo
breaking
bug
bug
confirmed
bug
duplicate
bug
needs-more-info
bug
new-report
bug
reported-upstream
code/actions
code/api
code/auth
code/auth/faidp
code/auth/farp
code/email
code/federation
code/git
code/migrations
code/packages
code/wiki
database
MySQL
database
PostgreSQL
database
SQLite
dependency-upgrade
dependency
Chi
dependency
Chroma
dependency
F3
dependency
ForgeFed
dependency
garage
dependency
Gitea
dependency
Golang
Discussion
duplicate
enhancement/feature
forgejo/accessibility
forgejo/branding
forgejo/ci
forgejo/commit-graph
forgejo/documentation
forgejo/furnace cleanup
forgejo/i18n
forgejo/interop
forgejo/moderation
forgejo/privacy
forgejo/release
forgejo/scaling
forgejo/security
forgejo/ui
Gain
High
Gain
Nice to have
Gain
Undefined
Gain
Very High
good first issue
i18n/backport-stable
impact
large
impact
medium
impact
small
impact
unknown
Incompatible license
issue
closed
issue
do-not-exist-yet
issue
open
manual test
Manually tested during feature freeze
OS
FreeBSD
OS
Linux
OS
macOS
OS
Windows
problem
QA
regression
release blocker
Release Cycle
Feature Freeze
release-blocker
v7.0
release-blocker
v7.0.1
release-blocker
v7.0.2
release-blocker
v7.0.3
release-blocker
v7.0.4
release-blocker
v8.0.0
release-blocker/v9.0.0
run-all-playwright-tests
run-coverage
run-end-to-end-tests
stage
2-research
stage
3-design
stage
4-implementation
test
manual
test
needed
test
needs-help
test
not-needed
test
present
untested
User research - time-tracker
valuable code
worth a release-note
User research - Accessibility
User research - Blocked
User research - Community
User research - Config (instance)
User research - Errors
User research - Filters
User research - Future backlog
User research - Git workflow
User research - Labels
User research - Moderation
User research - Needs input
User research - Notifications/Dashboard
User research - Rendering
User research - Repo creation
User research - Repo units
User research - Security
User research - Settings (in-app)
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
forgejo/forgejo!13554
No description provided.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.