Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Can not view code in pr when change a lot #31539

Closed
seepine opened this issue Jul 2, 2024 · 5 comments · Fixed by #32215
Closed

Can not view code in pr when change a lot #31539

seepine opened this issue Jul 2, 2024 · 5 comments · Fixed by #32215
Labels

Comments

@seepine
Copy link

seepine commented Jul 2, 2024

Description

hidden when change a lot, but click view 404.

Gitea Version

1.22.0

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

a212f63c2ae355043e419c72bfe87ffc
4ddecc65b33c8deac9917a8b98084f14

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

MySQL/MariaDB

@kemzeb
Copy link
Contributor

kemzeb commented Aug 27, 2024

Thanks for the bug report. Can you provide some more details and steps to reproduce the problem?

@kemzeb kemzeb added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Aug 27, 2024
@GiteaBot
Copy link
Contributor

We close issues that need feedback from the author if there were no new comments for a month. 🍵

@seepine
Copy link
Author

seepine commented Sep 28, 2024

Preface

A create private repo a/demo.
B fork repo b/demo and update index.js,then create pr to a/demo with checked.
image

Situation

A review the pr.
image
And got 404 from view or edit.

Expect

If not permission, maybe hide the view and edit button.

@lunny lunny reopened this Sep 28, 2024
@Zettat123
Copy link
Contributor

Since "Allow maintainers to edit" is enabled, user A should have permission to view and edit the PR files. So I think in this case we should not hide the button but should allow maintainers to view and edit the files

@lunny lunny removed the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Sep 29, 2024
@Zettat123
Copy link
Contributor

This feature was introduced by #18002. From its description we can see

edit/delete/upload files via web UI

However, I did some testing and found that when the forked repo is private, performing these operations via the web UI results in the 404 page. Maybe we need to improve the middleware to allow maintainers to access these pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants