vueniverse icon indicating copy to clipboard operation
vueniverse copied to clipboard

Admin interface

Open rlindskog opened this issue 7 years ago • 2 comments

Admin Interface

Time to create a legit admin interface for this project. It should include

  • [x] Admin's should sign-in at the same place everyone else does.

  • [ ] /admin: An admin home page, with quick insights related to page views and statistical graphs.

  • [x] /admin/users: A queryable user table using vuetify data tables, #6 and some server side magic. Admins should have the ability to revoke tokens from users, delete users, or revoke their current passwords.

  • [x] Protecting routes on the API should be as simple as throwing an option in the authenticate middleware. ex: router.get('/admin', authenticate({ role: ['admin', 'owner'] }), index.get)

  • [x] "401 Unauthorized" errors should follow suit with express-server-error.js.

rlindskog avatar Jun 30 '17 04:06 rlindskog

what would you need for /admin homepage and how to access the admin route?

Prozi avatar Dec 02 '17 12:12 Prozi

$store.state.user.role === 'admin' to access the admin route. There is also server validation in the authentication middleware if you want to actually see any data. I can make you an admin if you want to check it out in the demo!

rlindskog avatar Dec 09 '17 02:12 rlindskog