Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix view repo migration task logic #32152

Closed
wants to merge 1 commit into from

Conversation

wxiaoguang
Copy link
Contributor

No description provided.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 29, 2024
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 29, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Sep 29, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 29, 2024
@wxiaoguang
Copy link
Contributor Author

wxiaoguang commented Sep 29, 2024

This is just an example about the XORM usage problem.


Actually, the "repo migrating" page has a lot of problems:

  1. The "repo migrating" page is shown under /{owner}/{repo} routing path, but it uses /user/task/{id} to query the task information. It breaks the repo's permission model.
  2. The permission check is quite messy. For example: /user/task/{id} checks doer_id, but on the page it checks IsAdmin. Ideally it shouldn't check doer ID, but just respect the repo's permission.

To make things right, it needs to use something like /{owner}/{repo}/-/migrating-task to query the current repo's task state, and allow "admin" roles to delete or retry.

@wxiaoguang wxiaoguang closed this Sep 29, 2024
@wxiaoguang wxiaoguang deleted the fix-repo-mig branch September 29, 2024 10:13
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 28, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
lgtm/need 1 This PR needs approval from one additional maintainer to be merged. modifies/go Pull requests that update Go code size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants