mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code for #4023
This commit is contained in:
parent
febcbac1de
commit
4fa92ed5f7
@ -198,6 +198,9 @@ class LoginController extends Controller
|
||||
if ('remote_user_guard' === $authGuard && '' !== $logoutUri) {
|
||||
return redirect($logoutUri);
|
||||
}
|
||||
if ('remote_user_guard' === $authGuard && '' === $logoutUri) {
|
||||
session()->flash('error',trans('firefly.cant_logout_guard'));
|
||||
}
|
||||
|
||||
$this->guard()->logout();
|
||||
|
||||
|
@ -62,6 +62,13 @@ abstract class Controller extends BaseController
|
||||
app('view')->share('DEMO_PASSWORD', config('firefly.demo_password'));
|
||||
app('view')->share('FF_VERSION', config('firefly.version'));
|
||||
|
||||
// share custom auth guard info.
|
||||
$authGuard = config('firefly.authentication_guard');
|
||||
$logoutUri = config('firefly.custom_logout_uri');
|
||||
|
||||
app('view')->share('authGuard', $authGuard);
|
||||
app('view')->share('logoutUri', $logoutUri);
|
||||
|
||||
// upload size
|
||||
$maxFileSize = app('steam')->phpBytes(ini_get('upload_max_filesize'));
|
||||
$maxPostSize = app('steam')->phpBytes(ini_get('post_max_size'));
|
||||
|
@ -233,6 +233,7 @@ return [
|
||||
'all_destination_accounts' => 'Destination accounts',
|
||||
'all_source_accounts' => 'Source accounts',
|
||||
'back_to_index' => 'Back to the index',
|
||||
'cant_logout_guard' => 'Firefly III can\'t log you out.',
|
||||
|
||||
// check for updates:
|
||||
'update_check_title' => 'Check for updates',
|
||||
|
@ -212,11 +212,12 @@
|
||||
{% endif %}
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
{% if 'remote_user_guard' != authGuard or '' != logoutUri %}
|
||||
<li>
|
||||
<a href="{{ route('logout') }}">
|
||||
<i class="fa fa-sign-out fa-fw"></i>
|
||||
<span>{{ 'logout'|_ }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
Loading…
Reference in New Issue
Block a user