mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Updated laravel to 5.2 and started ldap implementation
This commit is contained in:
@ -29,7 +29,6 @@ class AuthController extends Controller
|
||||
|
||||
use AuthenticatesAndRegistersUsers, ThrottlesLogins;
|
||||
|
||||
protected $loginPath = '/login';
|
||||
protected $redirectPath = '/';
|
||||
protected $redirectAfterLogout = '/login';
|
||||
|
||||
@ -232,13 +231,9 @@ class AuthController extends Controller
|
||||
*/
|
||||
public function getLogin()
|
||||
{
|
||||
|
||||
if (view()->exists('auth.authenticate')) {
|
||||
return view('auth.authenticate');
|
||||
}
|
||||
|
||||
$socialDrivers = $this->socialAuthService->getActiveDrivers();
|
||||
return view('auth.login', ['socialDrivers' => $socialDrivers]);
|
||||
$authMethod = 'standard'; // TODO - rewrite to use config.
|
||||
return view('auth/login', ['socialDrivers' => $socialDrivers, 'authMethod' => $authMethod]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -253,7 +248,7 @@ class AuthController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* Redirect to the social site for authentication initended to register.
|
||||
* Redirect to the social site for authentication intended to register.
|
||||
* @param $socialDriver
|
||||
* @return mixed
|
||||
*/
|
||||
|
@ -48,7 +48,7 @@ abstract class Controller extends BaseController
|
||||
*/
|
||||
protected function preventAccessForDemoUsers()
|
||||
{
|
||||
if (env('APP_ENV', 'production') === 'demo') $this->showPermissionError();
|
||||
if (config('app.env') === 'demo') $this->showPermissionError();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -72,7 +72,7 @@ class UserController extends Controller
|
||||
$user->attachRoleId($request->get('role'));
|
||||
|
||||
// Get avatar from gravatar and save
|
||||
if (!env('DISABLE_EXTERNAL_SERVICES', false)) {
|
||||
if (!config('services.disable_services')) {
|
||||
$avatar = \Images::saveUserGravatar($user);
|
||||
$user->avatar()->associate($avatar);
|
||||
$user->save();
|
||||
|
Reference in New Issue
Block a user