Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin interface #3

Open
4 of 5 tasks
rlindskog opened this issue Jun 30, 2017 · 2 comments
Open
4 of 5 tasks

Admin interface #3

rlindskog opened this issue Jun 30, 2017 · 2 comments

Comments

@rlindskog
Copy link
Owner

rlindskog commented Jun 30, 2017

Admin Interface

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

  • 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.

  • /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.

  • 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)

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

@Prozi
Copy link
Contributor

Prozi commented Dec 2, 2017

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

@rlindskog
Copy link
Owner Author

$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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants