title: Role-Based Authorization with NodeJS/Express
body: <p>I am working on a NodeJS/express application using passportJS for sign in/sign up. I have defined a user model for all users, but want only certain users within my administration to have access to editing certain models. I was thinking of adding a boolean field, like <strong>isAdmin</strong> to determine this, but I don't know how I would verify admin users. To be specific, how would I determine when I need to generate a token for the admin user? How do I differentiate users in my administrations from ordinary users? </p>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p>Thanks!</p>