forked from kevadesu/forgejo
Add user secrets (#22191)
Fixes #22183 Replaces #22187 This PR adds secrets for users. I refactored the files for organizations and repos to use the same logic and templates. I splitted the secrets from deploy keys again and reverted the fix from #22187. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
parent
9f9a1ce922
commit
5882e179a9
17 changed files with 310 additions and 255 deletions
|
@ -469,6 +469,11 @@ func RegisterRoutes(m *web.Route) {
|
|||
})
|
||||
})
|
||||
}, packagesEnabled)
|
||||
m.Group("/secrets", func() {
|
||||
m.Get("", user_setting.Secrets)
|
||||
m.Post("", web.Bind(forms.AddSecretForm{}), user_setting.SecretsPost)
|
||||
m.Post("/delete", user_setting.SecretsDelete)
|
||||
})
|
||||
m.Get("/organization", user_setting.Organization)
|
||||
m.Get("/repos", user_setting.Repos)
|
||||
m.Post("/repos/unadopted", user_setting.AdoptOrDeleteRepository)
|
||||
|
@ -982,10 +987,12 @@ func RegisterRoutes(m *web.Route) {
|
|||
m.Combo("").Get(repo.DeployKeys).
|
||||
Post(web.Bind(forms.AddKeyForm{}), repo.DeployKeysPost)
|
||||
m.Post("/delete", repo.DeleteDeployKey)
|
||||
m.Group("/secrets", func() {
|
||||
m.Post("", web.Bind(forms.AddSecretForm{}), repo.SecretsPost)
|
||||
m.Post("/delete", repo.DeleteSecret)
|
||||
})
|
||||
})
|
||||
|
||||
m.Group("/secrets", func() {
|
||||
m.Get("", repo.Secrets)
|
||||
m.Post("", web.Bind(forms.AddSecretForm{}), repo.SecretsPost)
|
||||
m.Post("/delete", repo.DeleteSecret)
|
||||
})
|
||||
|
||||
m.Group("/lfs", func() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue