When you write your web apps and set up access lists (users and
groups), do you a) also set up corresponding users in the database
(and limit their db rights only to appropriate tables and operations),
or b) do you just have one master-type user that connects the web app
to the database, and manage user access rights solely within the app?
I've worked at places that have done both of those. In case of a), you
gain an extra layer of protection (even if the app code somehow falls
through, the logged in user can only access certain parts of the
database), but you also get more hassle (when designing the databases,
you have to think about who can see and do what, and write appropriate
GRANT statements).
I'm curious what you do (or think) on this matter.
~Dmitri