Skip to content

Incorrect URL for compare button on non forked repos not owned by user #5924

@juanpablo-santos

Description

@juanpablo-santos
  • Gitea version (or commit ref): 1.7.1
  • Git version: 2.14.3
  • Operating system: Ubuntu
  • Database (use [x]):
    • PostgreSQL
    • [ X] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • [ X] Yes (see below, you need at least a couple of users to reproduce the bug)
    • No
    • Not relevant
  • Log gist:

Description

Hi,

we've recently migrated to 1.7.1, and the compare button is showing the .SignedUserName for repositories which are neither a fork nor owned by the user. This wasn't happening on 1.6.0.

Seems 5c30817 introduced this behaviour, as part of #5877 released on 1.7.1.

How to reproduce

on try.gitea.io, user perry1234 created repo test-repo123 and added perry1235 as a collaborator, with admin rights

test-repo123 has two branches. When perry1235 clicks on the compare button, he gets an incorrect URL (see attached screenshot)

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedissue/regressionIndicates a previously functioning feature or behavior that has broken or regressed after a changetopic/uiChange the appearance of the Gitea UItype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions