forgejo/templates/repo/diff
Kyle Evans 38cd9ba47b
Allow unauthenticated users to compare (#11240)
* 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."

* 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."

* 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.

Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: guillep2k <18600385+guillep2k@users.noreply.github.com>
2020-05-04 19:44:30 -03:00
..
blob_excerpt.tmpl Fix and simplify some tmpl conditions (#11080) 2020-04-16 16:26:24 -05:00
box.tmpl Add a way to mark Conversation (code comment) resolved (#11037) 2020-04-18 10:50:25 -03:00
comment_form.tmpl Fix reply on code review (#10227) 2020-02-13 13:22:15 +08:00
comment_form_datahandler.tmpl
comments.tmpl Remove last traces of has-emoji class (#11263) 2020-05-01 20:58:45 +03:00
compare.tmpl Allow unauthenticated users to compare (#11240) 2020-05-04 19:44:30 -03:00
image_diff.tmpl Bugfix for image compare and minor improvements to image compare (#8289) 2019-10-04 15:58:54 -04:00
new_comment.tmpl
new_review.tmpl Fix submit review form (#11252) 2020-04-30 09:59:47 +08:00
options_dropdown.tmpl FIX download diff/patch from commit (#8792) 2019-11-02 18:47:25 -04:00
section_unified.tmpl Add a way to mark Conversation (code comment) resolved (#11037) 2020-04-18 10:50:25 -03:00
whitespace_dropdown.tmpl