diff options
author | Denis Denisov <denji@users.noreply.github.com> | 2017-02-21 17:02:10 +0200 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2017-02-21 23:02:10 +0800 |
commit | fd941db246e66244ec81f43d74b8358c06173fd6 (patch) | |
tree | be563ff04f3b809b2d11489447086d5251e9b55a /cmd/web.go | |
parent | fe5ff8e4b2b3c951fa85572f3760ee2a396247ac (diff) | |
download | gitea-fd941db246e66244ec81f43d74b8358c06173fd6.tar.gz gitea-fd941db246e66244ec81f43d74b8358c06173fd6.zip |
Protected branches system (#339)
* Protected branches system
* Moved default branch to branches section (`:org/:reponame/settings/branches`).
* Initial support Protected Branch.
- Admin does not restrict
- Owner not to limit
- To write permission restrictions
* reformat tmpl
* finished the UI and add/delete protected branch response
* remove unused comment
* indent all the template files and remove ru translations since we use crowdin
* fix the push bug
Diffstat (limited to 'cmd/web.go')
-rw-r--r-- | cmd/web.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd/web.go b/cmd/web.go index 03a87ca0d6..f9b4bdd270 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -421,6 +421,11 @@ func runWeb(ctx *cli.Context) error { m.Post("/access_mode", repo.ChangeCollaborationAccessMode) m.Post("/delete", repo.DeleteCollaboration) }) + m.Group("/branches", func() { + m.Combo("").Get(repo.ProtectedBranch).Post(repo.ProtectedBranchPost) + m.Post("/can_push", repo.ChangeProtectedBranch) + m.Post("/delete", repo.DeleteProtectedBranch) + }) m.Group("/hooks", func() { m.Get("", repo.Webhooks) |