Topic: User permission for each company/database

Hi, I have created 2 company in different database. How can I create a user A who can only access company A and user B to access company B? Thanks.

Re: User permission for each company/database

Sofar, the Login system is different for each company. You can create similar login credentials for both company and access it. But if you want to switch to other company, you need to logout and login again by selecting the second company from the login screen.

Subscription service based on FA
HRM CRM POS batch Themes

3 (edited by stefan 08/29/2018 11:25:05 am)

Re: User permission for each company/database

Is this question about FA user or about DB user? If DB user, you can do it only if you use databases with no prefix.

Re: User permission for each company/database

This is clearly a FA user and company instance. The login system uses the company name from the $db_connections array in config_db.php file. The login user and password come from the appropriate database's users table.

Re: User permission for each company/database

Yes. I was asking for FA user and company instance. Because I notice it is currently single tenancy design. I'm wondering is there any plan to enhance to multi tenancy design? So that I don't have to create many database for companies.

https://www.netsolutions.com/insights/5-reasons-why-you-should-choose-multi-tenant-architecture-for-your-saas-application/

Re: User permission for each company/database

FA is multi tenant. You can choose to hos each company in a separate database or use different table prefixes and place them in the same table. Each "tenant" is then chosen in the login screen. The FA code is just a single instance but each company has it's own folder for it's data files.

If you create User A in both companies with same / different passwords, FA will accept that as well, since the users table is different for each company (with either different table prefixes in the same database oand/or different databases).