summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-05 18:08:42 -0500
committerUnknwon <u@gogs.io>2016-03-05 18:08:42 -0500
commit045f14fbd0e3553521f5092cf839be363c74a090 (patch)
tree9c82f5111c5c5262c97bd7936462fa4170e76b4f /cmd/web.go
parent05d8664f15013b0159b3689bda84e89dd7be22fd (diff)
downloadgitea-045f14fbd0e3553521f5092cf839be363c74a090.tar.gz
gitea-045f14fbd0e3553521f5092cf839be363c74a090.zip
#1146 finsih UI work for access mode of collaborators
Collaborators have write access as default, and can be changed via repository collaboration settings page to change between read, write and admin.
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmd/web.go b/cmd/web.go
index a6bf9c97f3..a7aea19256 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -190,6 +190,8 @@ func runWeb(ctx *cli.Context) {
bindIgnErr := binding.BindIgnErr
+ // FIXME: not all routes need go through same middlewares.
+ // Especially some AJAX requests, we can reduce middleware number to improve performance.
// Routers.
m.Get("/", ignSignIn, routers.Home)
m.Get("/explore", ignSignIn, routers.Explore)
@@ -400,7 +402,11 @@ func runWeb(ctx *cli.Context) {
m.Group("/settings", func() {
m.Combo("").Get(repo.Settings).
Post(bindIgnErr(auth.RepoSettingForm{}), repo.SettingsPost)
- m.Combo("/collaboration").Get(repo.Collaboration).Post(repo.CollaborationPost)
+ m.Group("/collaboration", func() {
+ m.Combo("").Get(repo.Collaboration).Post(repo.CollaborationPost)
+ m.Post("/access_mode", repo.ChangeCollaborationAccessMode)
+ m.Post("/delete", repo.DeleteCollaboration)
+ })
m.Group("/hooks", func() {
m.Get("", repo.Webhooks)