From 49e9faa03b3bf2e0509238bfe6a8556a0fc46618 Mon Sep 17 00:00:00 2001 From: Samir Patel <48686912+54mir@users.noreply.github.com> Date: Wed, 22 Dec 2021 16:49:43 -0600 Subject: [PATCH] stub out checker --- http/handler.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/http/handler.go b/http/handler.go index 6d7796087..2d9e57d22 100644 --- a/http/handler.go +++ b/http/handler.go @@ -518,6 +518,20 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) { h.Handler.ServeHTTP(w, r) } +// func (h *Handler)checkAuthorization(w http.ResponseWriter, r *http.Request, index string, neededPermission string) (bool, error){ +// groups, err := h.auth.Authenticate(w, r) +// if err != nil { +// return false, errors.Wrap(err, "authenticating") +// } + +// for group := range groups{ +// // is this group admin? +// // what kind of permissions do they have for this index? + +// } + +// } + // statikHandler implements the http.Handler interface, and responds to // requests for static assets with the appropriate file contents embedded // in a statik filesystem.