summaryrefslogtreecommitdiffstats
path: root/routers/admin
diff options
context:
space:
mode:
authorfzerorubigd <fzerorubigd@gmail.com>2014-12-31 21:37:51 +0330
committerfzerorubigd <fzerorubigd@gmail.com>2015-01-01 02:15:52 +0330
commit6643647687aa2ba8a41f8f95d404407ff6106d8c (patch)
treecae1cd7cddd7c5cb94fe5463ba6869a84476e22e /routers/admin
parentb6272d180343d8081941eb56f22fed5ffc830a7e (diff)
downloadgitea-6643647687aa2ba8a41f8f95d404407ff6106d8c.tar.gz
gitea-6643647687aa2ba8a41f8f95d404407ff6106d8c.zip
add afunction to rewrite all public keys on admin request
refs #763
Diffstat (limited to 'routers/admin')
-rw-r--r--routers/admin/admin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 563a9cdc41..ea50d5c4cb 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -118,6 +118,7 @@ const (
CLEAN_INACTIVATE_USER
CLEAN_REPO_ARCHIVES
GIT_GC_REPOS
+ SYNC_SSH_AUTHORIZED_KEY
)
func Dashboard(ctx *middleware.Context) {
@@ -144,6 +145,9 @@ func Dashboard(ctx *middleware.Context) {
case GIT_GC_REPOS:
success = ctx.Tr("admin.dashboard.git_gc_repos_success")
err = models.GitGcRepos()
+ case SYNC_SSH_AUTHORIZED_KEY:
+ success = ctx.Tr("admin.dashboard.resync_all_sshkeys_success")
+ err = models.RewriteAllPublicKeys()
}
if err != nil {