Hello!
For security reasons, I am only granting access to some tables for specific database users, and when staff members log in, I want a different database user to be querying the DB from the system.
I've set up different connection services in accordance with this instruction, but I'm facing the problem that the initialize()-method
is only run once per model, meaning that if you query a disallowed model once, log in (which should make it available) and then query the model again, the cached connection service still uses the database user who'd not allowed access.
How can I reset that cache when you log in, or is there a different functionality I should look into to solve this problem?
Thank you.
// dimhoLt