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

Closed
opened 2025-11-02 10:35:28 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @seepine on GitHub (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

Originally created by @seepine on GitHub (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](https://github.com/go-gitea/gitea/assets/93666053/2488e75d-28af-40fb-82f6-a62e3cf81f75) ![4ddecc65b33c8deac9917a8b98084f14](https://github.com/go-gitea/gitea/assets/93666053/560e34d4-d61b-4d76-aea7-5ec836c77b4d) ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database MySQL/MariaDB
GiteaMirror added the type/bug label 2025-11-02 10:35:28 -06:00
Author
Owner

@kemzeb commented on GitHub (Aug 27, 2024):

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

@kemzeb commented on GitHub (Aug 27, 2024): Thanks for the bug report. Can you provide some more details and steps to reproduce the problem?
Author
Owner

@GiteaBot commented on GitHub (Sep 27, 2024):

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

@GiteaBot commented on GitHub (Sep 27, 2024): We close issues that need feedback from the author if there were no new comments for a month. :tea:
Author
Owner

@seepine commented on GitHub (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.

@seepine commented on GitHub (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](https://github.com/user-attachments/assets/c2e88bdc-d400-45e9-9f64-edc07337a88c) ## Situation A review the pr. ![image](https://github.com/user-attachments/assets/d2fdb282-2048-4981-a5a9-c1c793dbeb12) And got 404 from view or edit. <img src="https://github.com/user-attachments/assets/e9fcb35e-771e-45b7-a789-4cdfb7f6c6c5" width=300/> <img src="https://github.com/user-attachments/assets/c55fda9b-133a-4fb9-abc9-9dc31469c5df" width=500/> ## Expect If not permission, maybe hide the view and edit button.
Author
Owner

@Zettat123 commented on GitHub (Sep 29, 2024):

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

@Zettat123 commented on GitHub (Sep 29, 2024): 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
Author
Owner

@Zettat123 commented on GitHub (Sep 30, 2024):

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.

@Zettat123 commented on GitHub (Sep 30, 2024): 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 in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13225