Skip to content

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

Closed
@mrjackwhitaker

Description

@mrjackwhitaker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions