forgejo/modules
wxiaoguang 83df0caf15
Sync gitea app path for git hooks and authorized keys when starting (#17335)
Gitea writes its own AppPath into git hook scripts. If Gitea's AppPath changes, then the git push will fail.

This PR:

* Introduce an AppState module, it can persist app states into database
* During GlobalInit, Gitea will check if the current AppPath is the same as last one. If they don't match, Gitea will sync git hooks.
* Refactor some code to make them more clear.
* Also, "Detect if gitea binary's name changed" #11341 is related, we call models.RewriteAllPublicKeys to update ssh authorized_keys file
2021-10-21 17:22:43 +08:00
..
activitypub Create pub/priv keypair for federation (#17071) 2021-09-28 15:19:22 -04:00
analyze Use git attributes to determine generated and vendored status for language stats and diffs (#16773) 2021-09-09 21:13:36 +01:00
appstate Sync gitea app path for git hooks and authorized keys when starting (#17335) 2021-10-21 17:22:43 +08:00
auth
avatar refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
base
cache
charset refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
context Frontend refactor, PascalCase to camelCase, remove unused code (#17365) 2021-10-21 15:37:43 +08:00
convert API pull's head/base have correct permission (#17214) 2021-10-07 02:03:37 +02:00
cron Add simple update checker to Gitea (#17212) 2021-10-16 02:14:34 -04:00
csv Prevent NPE in CSV diff rendering when column removed (#17018) 2021-10-20 20:10:03 +01:00
doctor Nicely handle missing user in collaborations (#17049) 2021-09-27 19:07:19 +01:00
emoji
eventsource
generate
git Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
gitgraph Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
graceful Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
hcaptcha
highlight Prevent panic in Org mode HighlightCodeBlock (#17140) 2021-09-24 14:29:32 +01:00
httpcache Use a variable but a function for IsProd because of a slight performance increment (#17368) 2021-10-20 16:37:19 +02:00
httplib refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
indexer Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
json
lfs Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
log refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
markup Fix some lints (#17337) 2021-10-17 20:47:12 +01:00
matchlist
metrics Add metrics to get issues by repository (#17225) 2021-10-05 20:39:37 +02:00
migrations Multiple tokens support for migrating from github (#17134) 2021-10-15 13:47:15 +08:00
nosql
notification API pull's head/base have correct permission (#17214) 2021-10-07 02:03:37 +02:00
options refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
password
pprof refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
private refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
process
proxy
public refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
queue Make the Mirror Queue a queue (#17326) 2021-10-17 12:43:25 +01:00
recaptcha refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
references
repofiles Move db related basic functions to models/db (#17075) 2021-09-19 19:49:59 +08:00
repository Sync gitea app path for git hooks and authorized keys when starting (#17335) 2021-10-21 17:22:43 +08:00
secret
session Move session to models/login (#17338) 2021-10-17 19:51:56 +01:00
setting Sync gitea app path for git hooks and authorized keys when starting (#17335) 2021-10-21 17:22:43 +08:00
ssh Offer rsa-sha2-512 and rsa-sha2-256 algorithms in internal SSH (#17281) 2021-10-20 15:55:33 -04:00
storage refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
structs [API] Add endpount to get user org permissions (#17232) 2021-10-12 12:47:19 +02:00
svg refactor: move from io/ioutil to io and os package (#17109) 2021-09-22 13:38:34 +08:00
sync
task
templates Use a variable but a function for IsProd because of a slight performance increment (#17368) 2021-10-20 16:37:19 +02:00
test Upgrade chi to v5 (#17298) 2021-10-13 22:50:23 -04:00
timeutil Allow mocking timeutil (#17354) 2021-10-18 21:12:26 +01:00
translation
typesniffer
upload
uri
user
util Add user status filter to admin user management page (#16770) 2021-10-12 20:11:35 +02:00
validation Upgrade chi to v5 (#17298) 2021-10-13 22:50:23 -04:00
web Upgrade chi to v5 (#17298) 2021-10-13 22:50:23 -04:00