webvimark / user-management

154 stars 163 forks source link

How to use ghost access control module on 5 separate environments with a common database? #103

Open rakeshkaswan opened 8 years ago

rakeshkaswan commented 8 years ago

I wan to create 5 separate environments like finance, management, change management, hr etc. For all these independent environments i am creating a single database. This database stores permission for all 5 environments. In this case how do i manage ghost control to use their access on individual environments.

sganz commented 8 years ago

If your 5 environments are 5 distinct applications it will not work well if they all share the same database. You can make it work when refreshing the routes each time you set up permissions in each application but do not delete unused routes. I have done this for 2 applications that share the same DB and it works, but it's not a great solution if some of the pages have the same name (about, contact, etc).

One solution would be to have the common DB but each application would have an added prefix to each route so no cross application confusion would exist. And in refreshing routes only a specific application routes are shown. It's a lot more complex then that to implement I'm sure...

Sandy