From c90b11ed350927fce3340b73038fdd09e39fd22f Mon Sep 17 00:00:00 2001 From: rob Date: Sat, 18 Dec 2021 15:31:36 -0500 Subject: [PATCH] enable Dashboard/analytics for all members (for now) --- app/controllers/dashboard.js | 2 +- app/views/index-logged-in.pug | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/dashboard.js b/app/controllers/dashboard.js index 6054aef..8d3d279 100644 --- a/app/controllers/dashboard.js +++ b/app/controllers/dashboard.js @@ -20,7 +20,7 @@ class DashboardController extends SiteController { const { dtp } = this; const { limiter: limiterService, session: sessionService } = dtp.services; - const authRequired = sessionService.authCheckMiddleware({ requireLogin: true, requireAdmin: true }); + const authRequired = sessionService.authCheckMiddleware({ requireLogin: true }); const router = express.Router(); dtp.app.use('/dashboard', router); diff --git a/app/views/index-logged-in.pug b/app/views/index-logged-in.pug index 63a8d95..7f2507d 100644 --- a/app/views/index-logged-in.pug +++ b/app/views/index-logged-in.pug @@ -10,10 +10,9 @@ block content div(uk-grid).uk-grid-small .uk-width-expand h3.uk-heading-bullet.uk-margin-small Your links - if user && user.flags.isAdmin - .uk-width-auto - a(href='/dashboard').uk-button.dtp-button-default.uk-button-small - +renderButtonIcon('fa-tachometer-alt', 'Dashboard') + .uk-width-auto + a(href='/dashboard').uk-button.dtp-button-default.uk-button-small + +renderButtonIcon('fa-tachometer-alt', 'Dashboard') .uk-width-auto button(type="button", uk-toggle={ target: '#link-editor' }).uk-button.dtp-button-primary.uk-button-small +renderButtonIcon('fa-plus', 'Add Link')