forgejo/routers/web/repo
Gusted 41c9a2606b
[SHARED] make confirmation clearer for dangerous actions
[GITEA] Fix cancelled migration deletion modal

- https://codeberg.org/forgejo/forgejo/pulls/1473 made that dangerous
actions such as deletion also would need to type in the owner's name.
This was apparently not reflected to the deletion modal for migrations
that failed or were cancelled.

(cherry picked from commit c38dbd6f889aeb52745eddb276225acd0153cba6)
(cherry picked from commit 7c07592d01b086b612195367c6a13560e5539767)
(cherry picked from commit 78637af2b6440ae307de5e21b284c08c02dd4d13)

[SHARED] make confirmation clearer for dangerous actions

- Currently the confirmation for dangerous actions such as transferring
the repository or deleting it only requires the user to ~~copy paste~~
type the repository name.
- This can be problematic when the user has a fork or another repository
with the same name as an organization's repository, and the confirmation
doesn't make clear that it could be deleting the wrong repository. While
it's mentioned in the dialog, it's better to be on the safe side and
also add the owner's name to be an element that has to be typed for
these dangerous actions.
- Added integration tests.

(cherry picked from commit bf679b24dd23c9ed586b9439e293bbd27cc89232)
(cherry picked from commit 1963085dd9d1521b7a4aa8558d409bd1a9f2e1da)
(cherry picked from commit fb94095d1992c3e47f03e0fccc98a90707a5271b)
(cherry picked from commit e1d1e46afee6891becdb6ccd027fc66843b56db9)
(cherry picked from commit 93993029e4ec8a20a8bc38d80bb4b801e52ee1b7)
(cherry picked from commit df3b058179d8f3e06cc6fb335b287c72c8952821)
(cherry picked from commit 8ccc6b9cba46a736665e4b25523da0baf1679702)
(cherry picked from commit 9fbe28fca3)
(cherry picked from commit 4ef2be6dc705c693735e024b28fd7dac3de39d47)

https://codeberg.org/forgejo/forgejo/pulls/1873
  Moved test from repo_test.go to forgejo_confirmation_repo_test.go to
  avoid conflicts.
(cherry picked from commit 83cae67aa3fe8f9eb732f86020e58b9ea4d8b5ec)
(cherry picked from commit 447009ff568a542985f6b3a9bc7237b9de3e3c54)
(cherry picked from commit 72c0a6150aee7c3a965c87e7348faa2b48c520de)
(cherry picked from commit 8ee9c070b98f64263d63dfef32d54bdad5f0d266)
(cherry picked from commit 89aba06403be898adbfff6b2d7bb01aad239a87c)
(cherry picked from commit 798407599f3d77bdd8bad5fa7abba81d417cd916)
2024-01-15 14:48:04 +00:00
..
actions Only check online runner when detecting matching runners in workflows (#28286) 2023-12-18 16:06:19 +00:00
setting [SHARED] make confirmation clearer for dangerous actions 2024-01-15 14:48:04 +00:00
activity.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
attachment.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
blame.go Use information from previous blame parts (#28572) 2023-12-21 22:48:18 +01:00
branch.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
cherry_pick.go Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
commit.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
compare.go Assign pull request to project during creation (#28227) 2024-01-12 15:25:15 +00:00
download.go Less naked returns (#25713) 2023-07-07 05:31:56 +00:00
editor.go Revert "Fix EOL handling in web editor" (#28101) 2023-11-22 09:14:16 +00:00
editor_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
find.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
githttp.go Adjust object format interface (#28469) 2023-12-17 11:56:08 +00:00
githttp_test.go Fix http protocol auth (#27875) 2023-11-02 22:14:33 +08:00
helper.go Improve tree not found page (#26570) 2023-09-29 07:42:39 +00:00
helper_test.go Make web context initialize correctly for different cases (#26726) 2023-08-25 19:07:42 +08:00
issue.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
issue_content_history.go Fix missing check (#28406) 2023-12-10 21:37:10 +02:00
issue_dependency.go Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
issue_label.go Even more db.DefaultContext refactor (#27352) 2023-10-03 10:30:41 +00:00
issue_label_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
issue_lock.go Penultimate round of db.DefaultContext refactor (#27414) 2023-10-11 04:24:07 +00:00
issue_pin.go Fix missing check (#28406) 2023-12-10 21:37:10 +02:00
issue_stopwatch.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
issue_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
issue_timetrack.go Final round of db.DefaultContext refactor (#27587) 2023-10-14 08:37:24 +00:00
issue_watch.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
middlewares.go Fix viewing wiki commit on empty repo (#28040) 2023-11-14 19:42:23 +08:00
migrate.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
milestone.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
packages.go Fix the display of org level badges (#26504) 2023-09-06 14:38:14 +08:00
patch.go Upgrade to golangci-lint@v1.55.0 (#27756) 2023-10-24 02:54:59 +00:00
projects.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
projects_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00
pull.go Modernize merge button (#28140) 2024-01-15 00:00:47 +02:00
pull_review.go More db.DefaultContext refactor (#27265) 2023-09-29 12:12:54 +00:00
release.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
release_test.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
render.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
repo.go Move more functions to db.Find (#28419) 2024-01-15 02:19:25 +00:00
search.go Refactor indexer (#25174) 2023-06-23 12:37:56 +00:00
topic.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
treelist.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
view.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
view_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
wiki.go Rework markup link rendering (#26745) 2024-01-15 08:49:24 +00:00
wiki_test.go Move web/api context related testing function into a separate package (#26859) 2023-09-01 11:26:07 +00:00