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

500 Error when attempting to change repository to public with FORCE_PRIVATE enabled #17967

Closed
mrjackwhitaker opened this issue Dec 13, 2021 · 0 comments · Fixed by #17971
Closed

Comments

@mrjackwhitaker
Copy link

Gitea Version

1.15.3

Git Version

2.25.1

Operating System

Ubuntu 20.04.3

How are you running Gitea?

Ubuntu package

Database

PostgreSQL

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/mrjackwhitaker/a21a150ddeb9c7d8d94c4e2c86791ee3

Description

When attempting to change a FORCE_PRIVATE repository to public, the user is served a 500 error, when it should be a 403 due to insufficient privilege.

A helpful error message should be given to the user - even though the API was not expecting the request, it should be able to handle the request with an appropriate status code.

NOTE: I was unable to uncheck the visibility checkbox, so edited the HTML to uncheck it.

Screenshots

No response

zeripath added a commit to zeripath/gitea that referenced this issue Dec 13, 2021
Instead of returning an ISE just return the form with a flash error instead.

Fix go-gitea#17967

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Apr 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant