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

Allow unauthenticated users to compare #11240

Merged
merged 5 commits into from
May 4, 2020

Commits on May 3, 2020

  1. routers: make /compare route available to unauthenticated users

    Remove some bits of the compare interface if the user isn't signed in.
    Notably, they don't need to see the "New Pull Request" button box nor the
    hidden form that would fail to submit due to the POST request continuing to
    require proper privileges.
    
    Follow-up commits will improve the UI a bit around this, removing some
    "Pull Request" verbiage in favor of "Compare."
    kevans91 committed May 3, 2020
    Configuration menu
    Copy the full SHA
    69291c7 View commit details
    Browse the repository at this point in the history
  2. ui: home: show "compare" button for unauthenticated users

    This change requires pulling in the BaseRepo unconditionally and
    recording if the pull request is in-fact not allowed
    (.PullRequestCtx.Allowed). If the user isn't allowed to create a pull
    request, either because this isn't a fork or same-fork branch PRs aren't
    allowed, then we'll name the button "Compare" instead of "Pull Request."
    kevans91 committed May 3, 2020
    Configuration menu
    Copy the full SHA
    565ef1f View commit details
    Browse the repository at this point in the history
  3. ui: branch list: use the new Compare language when available

    When viewing the branch listing as an unauthenticated user, you'll get
    "Pull Request" buttons. use the new "Compare" verbiage instead, which
    matches GitHub behavior when you can't issue a pull request from the
    branches.
    kevans91 committed May 3, 2020
    Configuration menu
    Copy the full SHA
    e4eb070 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2020

  1. Configuration menu
    Copy the full SHA
    e2cf50c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8c6275f View commit details
    Browse the repository at this point in the history