forgejo/modules
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
..
analyze Migrate to go-enry new version (#10906) 2020-04-15 20:40:39 +03:00
auth Add option to increase provided OAuth2 token maximum size (#11180) 2020-04-23 00:47:23 +02:00
avatar
base Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
cache make avatar lookup occur at image request (#10540) 2020-03-27 14:34:39 +02:00
charset
context Allow unauthenticated users to compare (#11240) 2020-05-04 19:44:30 -03:00
convert API: Add pull review endpoints (#11224) 2020-05-02 03:20:51 +03:00
cron Refactor repository check and sync functions (#9854) 2020-01-20 20:01:19 +00:00
emoji Support unicode emojis and remove emojify.js (#11032) 2020-04-28 15:05:39 -03:00
generate Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
git Support unicode emojis and remove emojify.js (#11032) 2020-04-28 15:05:39 -03:00
gitgraph
graceful Prevent panic during wrappedConn close at hammertime (#11219) 2020-04-26 21:01:06 -03:00
highlight
httplib
indexer Log the indexer path on failure (#11172) 2020-04-22 16:16:58 -04:00
lfs Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
log modules/log: remove noop written variables (#10182) 2020-02-07 21:35:30 +01:00
markup Restore checkbox rendering and prevent poor sanitization of spans (#11277) 2020-05-03 17:17:24 -03:00
metrics
migrations When migrating from Gitlab map Approvals to approving Reviews (#11147) 2020-04-20 13:30:46 +01:00
notification Fix spelling mistake with Rewiew (#11262) 2020-04-30 21:24:08 +01:00
options Rename scripts to build and add revive command as a new build tool command (#10942) 2020-04-03 22:29:12 +03:00
password
pprof
private Upgrade golangci-lint to 1.24.0 (#10894) 2020-03-30 21:52:45 +03:00
process Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
public Send 404 immediately for known public requests (#11117) 2020-04-18 22:01:06 +01:00
queue Improve config logging when WrappedQueue times out (#11174) 2020-04-22 13:38:40 +01:00
recaptcha
references Accept punctuation after simple+cross repository issue references (#10091) 2020-02-01 18:01:30 +00:00
repofiles Fix GetContents(): Dont't ignore Executables (#11192) 2020-04-24 19:20:22 +03:00
repository Fix forked repo has no icon and language stat. (#10791) 2020-04-08 15:13:04 +03:00
secret
session
setting Sendmail should create a process on the gitea system and have a default timeout (#11256) 2020-05-03 00:04:31 +01:00
ssh log.Fatal on failure to listen to SSH port (#10795) 2020-03-23 07:59:38 +00:00
structs API: Add pull review endpoints (#11224) 2020-05-02 03:20:51 +03:00
sync
task
templates Support unicode emojis and remove emojify.js (#11032) 2020-04-28 15:05:39 -03:00
test Add Organization Wide Labels (#10814) 2020-04-01 01:14:46 -03:00
timeutil
upload
user Add gitea-vet (#10948) 2020-04-05 07:20:50 +01:00
util inform participants on UI too (#10473) 2020-02-28 05:16:41 -03:00
validation [API] Get a single commit via Ref (#10915) 2020-04-07 22:54:46 -04:00
webhook Add Matrix webhook (#10831) 2020-03-28 15:09:55 +02:00