mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-09 03:08:05 +02:00
Mirror SSH Keys -> Managed SSH Keys
This commit is contained in:
1 parent
ab27bfc58e
commit
41f1f53b67
16 files changed
+75
-75
No files matched your search
@@ -51,6 +51,6 @@ func RegenerateSSHKey(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Flash.Success(ctx.Tr("settings.mirror_ssh_regenerated"))
|
||||
ctx.Flash.Success(ctx.Tr("settings.managed_ssh_regenerated"))
|
||||
ctx.Redirect(ctx.Org.OrgLink + "/settings/ssh_keys")
|
||||
}
|
||||
@@ -346,7 +346,7 @@ func loadKeysData(ctx *context.Context) {
|
||||
// Load SSH mirror keypair if it exists
|
||||
mirrorKeypair, err := mirror_service.GetOrCreateSSHKeypairForUser(ctx, ctx.Doer.ID)
|
||||
if err == nil {
|
||||
ctx.Data["HasMirrorSSHKey"] = true
|
||||
ctx.Data["HasManagedSSHKey"] = true
|
||||
|
||||
// Create a struct with the public key including comment
|
||||
publicKeyWithComment, _ := mirrorKeypair.GetPublicKeyWithComment(ctx)
|
||||
@@ -358,9 +358,9 @@ func loadKeysData(ctx *context.Context) {
|
||||
PublicKeyWithComment: publicKeyWithComment,
|
||||
}
|
||||
|
||||
ctx.Data["MirrorSSHKey"] = mirrorKeyData
|
||||
ctx.Data["ManagedSSHKey"] = mirrorKeyData
|
||||
} else {
|
||||
ctx.Data["HasMirrorSSHKey"] = false
|
||||
ctx.Data["HasManagedSSHKey"] = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,6 +372,6 @@ func RegenerateUserSSHKeypair(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
ctx.Flash.Success(ctx.Tr("settings.mirror_ssh_regenerated"))
|
||||
ctx.Flash.Success(ctx.Tr("settings.managed_ssh_regenerated"))
|
||||
ctx.Redirect(setting.AppSubURL + "/user/settings/keys")
|
||||
}
|
||||
Reference in new issue
Block a user