How to flag a Volt user with is admin role?

60 views Asked by At

How do I flag a specific user of a Volt with an admin role? I know I have to set if a current_user is admin role? on a model...but how does the database know you are the one with admin role?

1

There are 1 answers

0
Ryan On

So an admin flag is something you add in your app, it gets stored in the database, but the database or volt it's self doesn't have the concept of admin's built in. Instead you add some field to represent that the user is an admin or not, then you check that flag when implementing permissions.