Browse Source

enable Dashboard/analytics for all members (for now)

pull/1/head
Rob Colbert 3 years ago
parent
commit
c90b11ed35
  1. 2
      app/controllers/dashboard.js
  2. 1
      app/views/index-logged-in.pug

2
app/controllers/dashboard.js

@ -20,7 +20,7 @@ class DashboardController extends SiteController {
const { dtp } = this; const { dtp } = this;
const { limiter: limiterService, session: sessionService } = dtp.services; 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(); const router = express.Router();
dtp.app.use('/dashboard', router); dtp.app.use('/dashboard', router);

1
app/views/index-logged-in.pug

@ -10,7 +10,6 @@ block content
div(uk-grid).uk-grid-small div(uk-grid).uk-grid-small
.uk-width-expand .uk-width-expand
h3.uk-heading-bullet.uk-margin-small Your links h3.uk-heading-bullet.uk-margin-small Your links
if user && user.flags.isAdmin
.uk-width-auto .uk-width-auto
a(href='/dashboard').uk-button.dtp-button-default.uk-button-small a(href='/dashboard').uk-button.dtp-button-default.uk-button-small
+renderButtonIcon('fa-tachometer-alt', 'Dashboard') +renderButtonIcon('fa-tachometer-alt', 'Dashboard')

Loading…
Cancel
Save