Open jpgnz opened 10 years ago
FWIW, this is how I've managed to get around it:
//filters.php
Route::filter('Auth', function()
{
if ((Auth::guest()) || (!$user->hasRole("GoAccess"))) // If the user is not logged in/has wrong role
{
return Redirect::guest('http://login.domain');
}
});
//routes.php
Route::group(array(
'domain' => 'login.domain',
'before' => 'GoAccess'
), function()
{
Route::get('/', 'GoController@index');
});
@jpgnz Good one. I'm going to look on routeNeedsRole
implementation. I think there should be a way to test the route against groups.
For now, your workaround seems to be the way to go.
Sweet :)
Was this bug solved?
Attempting to setup multiple domains like so:
www.domain - Front guest domain, no auth. login.domain - Sub domain, handles normal authentication (basically all Confide routes). go.domain - Logged in domain. All requests must be authenticated.
No matter what domain I access, the Entrust::routeNeedsRole seems to be running, causing an obvious redirect loop, as there's no way to login.
Ideas/Workarounds?