I'm currently working on a project (SailsJS 0.11) with different databases. All my users have different read permissions on those databases. For example :
- I have two databases DB_A and DB_B
- There are two users USER_A and USER_B
- USER_A has only the right to read on DB_A
- USER_B has only the right to read on DB_B
Therefore, I would like to modify my models connection based on the user which is querying them. Is that possible ? How would you do that ?
Thanks for reading and have a nice day !