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