mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-27 00:36:38 -06:00
Remove deprecated settings.
This commit is contained in:
parent
001ef4fe1c
commit
49758c4e72
@ -15,7 +15,6 @@ namespace FireflyIII\Handlers\Events;
|
||||
|
||||
use Exception;
|
||||
use FireflyConfig;
|
||||
use FireflyIII\Events\ConfirmedUser;
|
||||
use FireflyIII\Events\RegisteredUser;
|
||||
use FireflyIII\Events\RequestedNewPassword;
|
||||
use FireflyIII\Events\ResentConfirmation;
|
||||
|
@ -63,15 +63,6 @@ class ConfigurationController extends Controller
|
||||
$isDemoSite = FireflyConfig::get('is_demo_site', config('firefly.configuration.is_demo_site'))->data;
|
||||
$siteOwner = env('SITE_OWNER');
|
||||
|
||||
// email settings:
|
||||
$sendErrorMessage = [
|
||||
'mail_for_lockout' => FireflyConfig::get('mail_for_lockout', config('firefly.configuration.mail_for_lockout'))->data,
|
||||
'mail_for_blocked_domain' => FireflyConfig::get('mail_for_blocked_domain', config('firefly.configuration.mail_for_blocked_domain'))->data,
|
||||
'mail_for_blocked_email' => FireflyConfig::get('mail_for_blocked_email', config('firefly.configuration.mail_for_blocked_email'))->data,
|
||||
'mail_for_bad_login' => FireflyConfig::get('mail_for_bad_login', config('firefly.configuration.mail_for_bad_login'))->data,
|
||||
'mail_for_blocked_login' => FireflyConfig::get('mail_for_blocked_login', config('firefly.configuration.mail_for_blocked_login'))->data,
|
||||
];
|
||||
|
||||
return view(
|
||||
'admin.configuration.index',
|
||||
compact('subTitle', 'subTitleIcon', 'singleUserMode', 'mustConfirmAccount', 'isDemoSite', 'sendErrorMessage', 'siteOwner')
|
||||
@ -94,13 +85,6 @@ class ConfigurationController extends Controller
|
||||
FireflyConfig::set('must_confirm_account', $data['must_confirm_account']);
|
||||
FireflyConfig::set('is_demo_site', $data['is_demo_site']);
|
||||
|
||||
// email settings
|
||||
FireflyConfig::set('mail_for_lockout', $data['mail_for_lockout']);
|
||||
FireflyConfig::set('mail_for_blocked_domain', $data['mail_for_blocked_domain']);
|
||||
FireflyConfig::set('mail_for_blocked_email', $data['mail_for_blocked_email']);
|
||||
FireflyConfig::set('mail_for_bad_login', $data['mail_for_bad_login']);
|
||||
FireflyConfig::set('mail_for_blocked_login', $data['mail_for_blocked_login']);
|
||||
|
||||
// flash message
|
||||
Session::flash('success', strval(trans('firefly.configuration_updated')));
|
||||
Preferences::mark();
|
||||
|
@ -39,11 +39,6 @@ class ConfigurationRequest extends Request
|
||||
'single_user_mode' => intval($this->get('single_user_mode')) === 1,
|
||||
'must_confirm_account' => intval($this->get('must_confirm_account')) === 1,
|
||||
'is_demo_site' => intval($this->get('is_demo_site')) === 1,
|
||||
'mail_for_lockout' => intval($this->get('mail_for_lockout')) === 1,
|
||||
'mail_for_blocked_domain' => intval($this->get('mail_for_blocked_domain')) === 1,
|
||||
'mail_for_blocked_email' => intval($this->get('mail_for_blocked_email')) === 1,
|
||||
'mail_for_bad_login' => intval($this->get('mail_for_bad_login')) === 1,
|
||||
'mail_for_blocked_login' => intval($this->get('mail_for_blocked_login')) === 1,
|
||||
];
|
||||
}
|
||||
|
||||
@ -56,11 +51,6 @@ class ConfigurationRequest extends Request
|
||||
'single_user_mode' => 'between:0,1|numeric',
|
||||
'must_confirm_account' => 'between:0,1|numeric',
|
||||
'is_demo_site' => 'between:0,1|numeric',
|
||||
'mail_for_lockout' => 'between:0,1|numeric',
|
||||
'mail_for_blocked_domain' => 'between:0,1|numeric',
|
||||
'mail_for_blocked_email' => 'between:0,1|numeric',
|
||||
'mail_for_bad_login' => 'between:0,1|numeric',
|
||||
'mail_for_blocked_login' => 'between:0,1|numeric',
|
||||
];
|
||||
|
||||
return $rules;
|
||||
|
@ -865,11 +865,6 @@ return [
|
||||
'setting_is_demo_site_explain' => 'If you check this box, this installation will behave as if it is the demo site, which can have weird side effects.',
|
||||
'setting_send_email_notifications' => 'Send email notifications',
|
||||
'setting_send_email_explain' => 'Firefly III can send you email notifications about certain events. They will be sent to <code>:site_owner</code>. This email address can be set in the <code>.env</code> file.',
|
||||
'mail_for_lockout_help' => 'When a user is locked out',
|
||||
'mail_for_blocked_domain_help' => 'When a user tries to register using a blocked domain',
|
||||
'mail_for_blocked_email_help' => 'When a user tries to register using a blocked email address',
|
||||
'mail_for_bad_login_help' => 'When a user fails to login',
|
||||
'mail_for_blocked_login_help' => 'When a blocked user tries to login',
|
||||
'block_code_bounced' => 'Email message(s) bounced',
|
||||
'block_code_expired' => 'Demo account expired',
|
||||
'no_block_code' => 'No reason for block or user not blocked',
|
||||
|
@ -162,11 +162,6 @@ return [
|
||||
'single_user_mode' => 'Single user mode',
|
||||
'must_confirm_account' => 'New users must activate account',
|
||||
'is_demo_site' => 'Is demo site',
|
||||
'mail_for_lockout' => 'Locked out',
|
||||
'mail_for_blocked_domain' => 'Blocked domain',
|
||||
'mail_for_blocked_email' => 'Blocked email address',
|
||||
'mail_for_bad_login' => 'Login failure',
|
||||
'mail_for_blocked_login' => 'Blocked user',
|
||||
|
||||
|
||||
// import
|
||||
|
@ -71,27 +71,6 @@
|
||||
</div>
|
||||
-->
|
||||
</div>
|
||||
<div class="row">
|
||||
{# send email messages about stuff: #}
|
||||
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="box box-default">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">{{ trans('firefly.setting_send_email_notifications') }}</h3>
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p class="text-info">
|
||||
{{ trans('firefly.setting_send_email_explain',{site_owner: siteOwner})|raw }}
|
||||
</p>
|
||||
{{ ExpandedForm.checkbox('mail_for_lockout','1', sendErrorMessage.mail_for_lockout, {helpText: trans('firefly.mail_for_lockout_help')}) }}
|
||||
{{ ExpandedForm.checkbox('mail_for_blocked_domain','1', sendErrorMessage.mail_for_blocked_domain, {helpText: trans('firefly.mail_for_blocked_domain_help')}) }}
|
||||
{{ ExpandedForm.checkbox('mail_for_blocked_email','1', sendErrorMessage.mail_for_blocked_email, {helpText: trans('firefly.mail_for_blocked_email_help')}) }}
|
||||
{{ ExpandedForm.checkbox('mail_for_bad_login','1', sendErrorMessage.mail_for_bad_login, {helpText: trans('firefly.mail_for_bad_login_help')}) }}
|
||||
{{ ExpandedForm.checkbox('mail_for_blocked_login','1', sendErrorMessage.mail_for_blocked_login, {helpText: trans('firefly.mail_for_blocked_login_help')}) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-md-6 col-sm-12 col-xs-12">
|
||||
<button type="submit" class="btn btn-success">
|
||||
|
@ -50,13 +50,6 @@ class ConfigurationControllerTest extends TestCase
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['must_confirm_account', false])->once()->andReturn($falseConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['is_demo_site', false])->times(2)->andReturn($falseConfig);
|
||||
|
||||
// new settings:
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_lockout', false])->once()->andReturn($falseConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_blocked_domain', false])->once()->andReturn($falseConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_blocked_email', false])->once()->andReturn($falseConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_bad_login', false])->once()->andReturn($falseConfig);
|
||||
FireflyConfig::shouldReceive('get')->withArgs(['mail_for_blocked_login', false])->once()->andReturn($falseConfig);
|
||||
|
||||
$this->call('GET', route('admin.configuration.index'));
|
||||
$this->assertResponseStatus(200);
|
||||
|
||||
@ -76,11 +69,6 @@ class ConfigurationControllerTest extends TestCase
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['single_user_mode', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['must_confirm_account', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['is_demo_site', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['mail_for_lockout', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['mail_for_blocked_domain', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['mail_for_blocked_email', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['mail_for_bad_login', false])->once();
|
||||
FireflyConfig::shouldReceive('set')->withArgs(['mail_for_blocked_login', false])->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$this->call('POST', route('admin.configuration.index.post'));
|
||||
|
Loading…
Reference in New Issue
Block a user