sentinel icon indicating copy to clipboard operation
sentinel copied to clipboard

Multi-tenancy support

Open dahabit opened this issue 6 years ago • 6 comments

Hello guys, it's has been a long time now we are waiting for Sentinel 3 and Multi-tenancy support any news about that or is there are links explain how we can use other packages like https://github.com/hyn/multi-tenant work correctly with Sentinel

dahabit avatar May 21 '18 09:05 dahabit

I have used Sentinel with hyn/multi-tenant before. but not the currently updated multi-tenant version. Let me know what specific questions or support you need.

bkintanar avatar May 21 '18 16:05 bkintanar

@bkintanar thanks for your replay , my question is when you enabled multi-tenant do you had to extend Sentinel core classes to add DB connection traits or what? I'm using https://github.com/AsgardCms/Platform

dahabit avatar May 21 '18 21:05 dahabit

@dahabit apparently yes. 😞

bkintanar avatar May 28 '18 10:05 bkintanar

I am also trying to implement Sentinel too. All my user credentials are stored on each tenant

I have tried using the force-tenant-connection-of-models config option with no luck sadly:

/**
 * Define a list of classes that you wish to force onto the tenant or system connection.
 * The connection will be forced when the Model has booted.
 *
 * @info Useful for overriding the connection of third party packages.
 */
'force-tenant-connection-of-models' => [
    \Cartalyst\Sentinel\Activations\EloquentActivation::class,
    \Cartalyst\Sentinel\Persistences\EloquentPersistence::class,
    \Cartalyst\Sentinel\Reminders\EloquentReminder::class,
    \Cartalyst\Sentinel\Roles\EloquentRole::class,
    \Cartalyst\Sentinel\Throttling\EloquentThrottle::class,
    \Cartalyst\Sentinel\Users\EloquentUser::class
]

Does anyone have any tips or suggesstions?

breaktag avatar Mar 04 '21 11:03 breaktag

@breaktag are you still using hyn/multi-tenant? there's a new package called tenancy/tenancy which is more robust and powerful.

bkintanar avatar Mar 04 '21 12:03 bkintanar

@bkintanar Yes, although I thought it would still be possible. I will give the new package ago anyway

breaktag avatar Mar 04 '21 14:03 breaktag