I am building a ruby on rails application using mysql for storing application related data. My application has a user console and admin console. Access to admin console is restricted to administrators. How do I mark a user as admin in mysql database.

link|improve this question
Dunno. How does your application determine that someone is an admin? – Ignacio Vazquez-Abrams Nov 13 '10 at 16:36
Thanks. I thought it was a mysql configuration. Didn't know it was application dependent. – ardsrk Nov 13 '10 at 17:13
feedback

1 Answer

Easy to mark a user as admin inside of mysql -
add another mysql user as documented here: http://dev.mysql.com/doc/refman/5.1/en/adding-users.html
and grant them appropriate permissions as documented here: http://dev.mysql.com/doc/refman/5.1/en/grant.html

as to connecting to the database as separate users, that's another ball of wax with overriding methods...

or are you talking about making an admin flag in the users table...that's a column with the boolean type

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.