N
N
narem2020-02-25 09:05:28
Node.js
narem, 2020-02-25 09:05:28

How to check for admin role?

There are 2 roles, user and admin. I need the admin to have an individual function in the menu, how is this implemented? At the moment of displaying the page for the user and the admin, take the login and sessions, see if he has rights to the database and display? And so every time? In the plan - at the time of the output is a check, at the time of sending the function - a check, etc.?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-02-25
@narem

General reasoning
https://habr.com/ru/company/ruvds/blog/335434/
Specific examples
https://jasonwatmore.com/post/2018/11/28/nodejs-ro...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question