Skip to content

Regression: Admin users cannot see private forks #33368

Closed
@koalajoe23

Description

@koalajoe23

Description

After the merge of #32528 forks are only visible via UI and API if the authenticated user has explicit permission to view the forked repository.

I maintain a gitea instance where we have automation in place to enumerate repo forks via API. Those are private forks and we cannot and don't want to explicitly manage permissions, so for API querying an account with admin permissions is used. Before the aforementioned PR this worked great, but now no forks are returned by the getForks API.

IMO, when an account with admin permissions is generally not bound to permission checks, e.g. when viewing and interacting with repos, this should also apply to enumerating private forks.

Gitea Version

1.23.1

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Debian Bookworm

How are you running Gitea?

Release binary (amd64) downloaded from Github

Database

PostgreSQL

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions