From 555cbeffa5ae8c5d5dc93b9764a963b13272ac66 Mon Sep 17 00:00:00 2001 From: woodsaj Date: Fri, 11 Sep 2015 01:18:36 +0800 Subject: [PATCH] allow all users to retrieve org and quota data. --- pkg/api/api.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/api/api.go b/pkg/api/api.go index 2b87863d188..90118d93912 100644 --- a/pkg/api/api.go +++ b/pkg/api/api.go @@ -91,9 +91,14 @@ func Register(r *macaron.Macaron) { r.Put("/:id", bind(m.UpdateUserCommand{}), wrap(UpdateUser)) }, reqGrafanaAdmin) - // current org + // org information available to all users. r.Group("/org", func() { r.Get("/", wrap(GetOrgCurrent)) + r.Get("/quotas", wrap(GetQuotas)) + }) + + // current org + r.Group("/org", func() { r.Put("/", bind(dtos.UpdateOrgForm{}), wrap(UpdateOrgCurrent)) r.Put("/address", bind(dtos.UpdateOrgAddressForm{}), wrap(UpdateOrgAddressCurrent)) r.Post("/users", limitQuota(m.QUOTA_USER), bind(m.AddOrgUserCommand{}), wrap(AddOrgUserToCurrentOrg))