Set password config to frontend: false.
This commit is contained in:
parent
4cfede572e
commit
6112f1de0f
2 changed files with 161 additions and 6 deletions
155
db/migrate/20160621000001_update_setting_password.rb
Normal file
155
db/migrate/20160621000001_update_setting_password.rb
Normal file
|
@ -0,0 +1,155 @@
|
|||
class UpdateSettingPassword < ActiveRecord::Migration
|
||||
def up
|
||||
# return if it's a new setup
|
||||
return if !Setting.find_by(name: 'system_init_done')
|
||||
|
||||
Setting.create_or_update(
|
||||
title: 'Ignore Escalation/SLA Information',
|
||||
name: 'import_ignore_sla',
|
||||
area: 'Import::Base',
|
||||
description: 'Ignore Escalation/SLA Information form import system.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'import_ignore_sla',
|
||||
tag: 'boolean',
|
||||
options: {
|
||||
true => 'yes',
|
||||
false => 'no',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: false,
|
||||
frontend: false,
|
||||
)
|
||||
Setting.create_or_update(
|
||||
title: 'Define searchable models.',
|
||||
name: 'models_searchable',
|
||||
area: 'Models::Base',
|
||||
description: 'Define the models which can be searched for.',
|
||||
options: {},
|
||||
state: [],
|
||||
frontend: true,
|
||||
)
|
||||
Setting.create_or_update(
|
||||
title: 'Minimal size',
|
||||
name: 'password_min_size',
|
||||
area: 'Security::Password',
|
||||
description: 'Password need to have at least minimal size of characters.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'password_min_size',
|
||||
tag: 'select',
|
||||
options: {
|
||||
4 => ' 4',
|
||||
5 => ' 5',
|
||||
6 => ' 6',
|
||||
7 => ' 7',
|
||||
8 => ' 8',
|
||||
9 => ' 9',
|
||||
10 => '10',
|
||||
11 => '11',
|
||||
12 => '12',
|
||||
13 => '13',
|
||||
14 => '14',
|
||||
15 => '15',
|
||||
16 => '16',
|
||||
17 => '17',
|
||||
18 => '18',
|
||||
19 => '19',
|
||||
20 => '20',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: 6,
|
||||
frontend: false,
|
||||
)
|
||||
Setting.create_or_update(
|
||||
title: '2 lower and 2 upper characters',
|
||||
name: 'password_min_2_lower_2_upper_characters',
|
||||
area: 'Security::Password',
|
||||
description: 'Password need to contain 2 lower and 2 upper characters.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'password_min_2_lower_2_upper_characters',
|
||||
tag: 'select',
|
||||
options: {
|
||||
1 => 'yes',
|
||||
0 => 'no',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: 0,
|
||||
frontend: false,
|
||||
)
|
||||
Setting.create_or_update(
|
||||
title: 'Digit required',
|
||||
name: 'password_need_digit',
|
||||
area: 'Security::Password',
|
||||
description: 'Password need to have at least one digit.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: 'Needed',
|
||||
null: true,
|
||||
name: 'password_need_digit',
|
||||
tag: 'select',
|
||||
options: {
|
||||
1 => 'yes',
|
||||
0 => 'no',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: 1,
|
||||
frontend: false,
|
||||
)
|
||||
Setting.create_or_update(
|
||||
title: 'Maximal failed logins',
|
||||
name: 'password_max_login_failed',
|
||||
area: 'Security::Password',
|
||||
description: 'Maximal failed logins after account is inactive.',
|
||||
options: {
|
||||
form: [
|
||||
{
|
||||
display: '',
|
||||
null: true,
|
||||
name: 'password_max_login_failed',
|
||||
tag: 'select',
|
||||
options: {
|
||||
4 => ' 4',
|
||||
5 => ' 5',
|
||||
6 => ' 6',
|
||||
7 => ' 7',
|
||||
8 => ' 8',
|
||||
9 => ' 9',
|
||||
10 => '10',
|
||||
11 => '11',
|
||||
13 => '13',
|
||||
14 => '14',
|
||||
15 => '15',
|
||||
16 => '16',
|
||||
17 => '17',
|
||||
18 => '18',
|
||||
19 => '19',
|
||||
20 => '20',
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
state: 10,
|
||||
frontend: false,
|
||||
)
|
||||
end
|
||||
end
|
12
db/seeds.rb
12
db/seeds.rb
|
@ -679,7 +679,7 @@ Setting.create_if_not_exists(
|
|||
],
|
||||
},
|
||||
state: 6,
|
||||
frontend: true
|
||||
frontend: false
|
||||
)
|
||||
Setting.create_if_not_exists(
|
||||
title: '2 lower and 2 upper characters',
|
||||
|
@ -701,7 +701,7 @@ Setting.create_if_not_exists(
|
|||
],
|
||||
},
|
||||
state: 0,
|
||||
frontend: true
|
||||
frontend: false
|
||||
)
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Digit required',
|
||||
|
@ -723,7 +723,7 @@ Setting.create_if_not_exists(
|
|||
],
|
||||
},
|
||||
state: 1,
|
||||
frontend: true
|
||||
frontend: false
|
||||
)
|
||||
Setting.create_if_not_exists(
|
||||
title: 'Maximal failed logins',
|
||||
|
@ -759,7 +759,7 @@ Setting.create_if_not_exists(
|
|||
],
|
||||
},
|
||||
state: 10,
|
||||
frontend: true
|
||||
frontend: false
|
||||
)
|
||||
|
||||
Setting.create_if_not_exists(
|
||||
|
@ -1260,7 +1260,7 @@ Setting.create_if_not_exists(
|
|||
description: 'Define the models which can be searched for.',
|
||||
options: {},
|
||||
state: [],
|
||||
frontend: false,
|
||||
frontend: true,
|
||||
)
|
||||
|
||||
Setting.create_if_not_exists(
|
||||
|
@ -1379,7 +1379,7 @@ Setting.create_if_not_exists(
|
|||
],
|
||||
},
|
||||
state: false,
|
||||
frontend: true
|
||||
frontend: false
|
||||
)
|
||||
|
||||
Setting.create_if_not_exists(
|
||||
|
|
Loading…
Reference in a new issue