aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index b793cf0daf..03a87ca0d6 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -345,8 +345,14 @@ func runWeb(ctx *cli.Context) error {
// ***** START: Organization *****
m.Group("/org", func() {
- m.Get("/create", org.Create)
- m.Post("/create", bindIgnErr(auth.CreateOrgForm{}), org.CreatePost)
+ m.Group("", func() {
+ m.Get("/create", org.Create)
+ m.Post("/create", bindIgnErr(auth.CreateOrgForm{}), org.CreatePost)
+ }, func(ctx *context.Context) {
+ if !ctx.User.CanCreateOrganization() {
+ ctx.NotFound()
+ }
+ })
m.Group("/:org", func() {
m.Get("/dashboard", user.Dashboard)