From d4361de8b9f960324e8cac430a5ed66a60225993 Mon Sep 17 00:00:00 2001 From: gmemstr Date: Sun, 3 Dec 2017 16:24:04 -0800 Subject: [PATCH] Added dropdowns for permission roles --- assets/web/static/app.js | 7 +++++++ assets/web/static/styles.css | 2 +- router/router.go | 5 +++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/assets/web/static/app.js b/assets/web/static/app.js index b4013ff..b87fab0 100644 --- a/assets/web/static/app.js +++ b/assets/web/static/app.js @@ -121,6 +121,13 @@ const useredit = { +

+ +

diff --git a/assets/web/static/styles.css b/assets/web/static/styles.css index 8050c86..e7ed980 100644 --- a/assets/web/static/styles.css +++ b/assets/web/static/styles.css @@ -98,7 +98,7 @@ hr { font-family: Monospace; } -input[type=text], input[type=date], input[type=file], input[type=password],textarea { +input[type=text], input[type=date], input[type=file], input[type=password],textarea, select { padding:10px; border-radius: 4px; box-sizing: border-box; diff --git a/router/router.go b/router/router.go index 8a0fdeb..550ec70 100644 --- a/router/router.go +++ b/router/router.go @@ -67,8 +67,9 @@ func Init() *mux.Router { rootHandler(), )).Methods("GET") - // Authenticated endpoints should be passed to BasicAuth() - // first + // RequireAuthorization() handles authentication + // and takes a single argument for permission level. + // 0 any user, 1 most users, 2 only admin users r.Handle("/admin", Handle( auth.RequireAuthorization(0), adminHandler(),