Do not show create org link when allow_org_create is set to false, Fixes #2135

This commit is contained in:
Torkel Ödegaard
2015-06-11 08:16:09 +02:00
parent b39f8fb4de
commit 5962bcbc6c
4 changed files with 9 additions and 8 deletions
+1
View File
@@ -26,6 +26,7 @@ func Register(r *macaron.Macaron) {
// authed views
r.Get("/profile/", reqSignedIn, Index)
r.Get("/org/", reqSignedIn, Index)
r.Get("/org/new", reqSignedIn, Index)
r.Get("/datasources/", reqSignedIn, Index)
r.Get("/datasources/edit/*", reqSignedIn, Index)
r.Get("/org/users/", reqSignedIn, Index)
+1 -1
View File
@@ -99,7 +99,7 @@ func getFrontendSettingsMap(c *middleware.Context) (map[string]interface{}, erro
"defaultDatasource": defaultDatasource,
"datasources": datasources,
"appSubUrl": setting.AppSubUrl,
"viewerRoleMode": setting.ViewerRoleMode,
"allowOrgCreate": setting.AllowUserOrgCreate || c.IsGrafanaAdmin,
"buildInfo": map[string]interface{}{
"version": setting.BuildVersion,
"commit": setting.BuildCommit,