2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2017-09-08 08:28:34 +00:00
|
|
|
class ObjectManagerUpdateUser < ActiveRecord::Migration[4.2]
|
2016-02-17 18:36:33 +00:00
|
|
|
def up
|
2017-04-28 13:39:29 +00:00
|
|
|
|
|
|
|
# return if it's a new setup
|
2020-08-03 08:35:43 +00:00
|
|
|
return if !Setting.exists?(name: 'system_init_done')
|
2017-04-28 13:39:29 +00:00
|
|
|
|
2016-02-17 18:36:33 +00:00
|
|
|
UserInfo.current_user_id = 1
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'login',
|
|
|
|
display: 'Login',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
autocapitalize: false,
|
2018-12-19 17:31:51 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
2016-02-17 18:36:33 +00:00
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {},
|
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 100,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'firstname',
|
|
|
|
display: 'Firstname',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 150,
|
|
|
|
null: false,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
invite_agent: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
invite_customer: {
|
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 200,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'lastname',
|
|
|
|
display: 'Lastname',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 150,
|
|
|
|
null: false,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
invite_agent: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
invite_customer: {
|
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 300,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'email',
|
|
|
|
display: 'Email',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'email',
|
|
|
|
maxlength: 150,
|
|
|
|
null: false,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
invite_agent: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
invite_customer: {
|
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 400,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'web',
|
|
|
|
display: 'Web',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'url',
|
|
|
|
maxlength: 250,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 500,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'phone',
|
|
|
|
display: 'Phone',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'tel',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 600,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'mobile',
|
|
|
|
display: 'Mobile',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'tel',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 700,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'fax',
|
|
|
|
display: 'Fax',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'tel',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 800,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'organization_id',
|
|
|
|
display: 'Organization',
|
|
|
|
data_type: 'autocompletion_ajax',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
multiple: false,
|
2016-02-17 18:36:33 +00:00
|
|
|
nulloption: true,
|
2018-12-19 17:31:51 +00:00
|
|
|
null: true,
|
|
|
|
relation: 'Organization',
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {
|
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 900,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'department',
|
|
|
|
display: 'Department',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 200,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1000,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'street',
|
|
|
|
display: 'Street',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
2016-02-17 18:36:33 +00:00
|
|
|
maxlength: 100,
|
2018-12-19 17:31:51 +00:00
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1100,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'zip',
|
|
|
|
display: 'Zip',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1200,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'city',
|
|
|
|
display: 'City',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1300,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'address',
|
|
|
|
display: 'Address',
|
|
|
|
data_type: 'textarea',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
|
|
|
maxlength: 500,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1350,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'password',
|
|
|
|
display: 'Password',
|
|
|
|
data_type: 'input',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'password',
|
|
|
|
maxlength: 100,
|
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
autocomplete: 'off',
|
2018-12-19 17:31:51 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
2016-02-17 18:36:33 +00:00
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
Admin: {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {}
|
2016-02-17 18:36:33 +00:00
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1400,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
2018-04-12 14:57:37 +00:00
|
|
|
# rubocop:disable Lint/BooleanSymbol
|
2016-02-17 18:36:33 +00:00
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'vip',
|
|
|
|
display: 'VIP',
|
|
|
|
data_type: 'boolean',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
null: true,
|
|
|
|
default: false,
|
2016-02-17 18:36:33 +00:00
|
|
|
item_class: 'formGroup--halfSize',
|
2018-12-19 17:31:51 +00:00
|
|
|
options: {
|
2016-02-17 18:36:33 +00:00
|
|
|
false: 'no',
|
2018-12-19 17:31:51 +00:00
|
|
|
true: 'yes',
|
2016-02-17 18:36:33 +00:00
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
translate: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
2016-02-17 18:36:33 +00:00
|
|
|
edit: {
|
|
|
|
Admin: {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
Agent: {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
view: {
|
|
|
|
'-all-' => {
|
|
|
|
shown: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1490,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
2018-04-12 14:57:37 +00:00
|
|
|
# rubocop:enable Lint/BooleanSymbol
|
2016-02-17 18:36:33 +00:00
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'note',
|
|
|
|
display: 'Note',
|
|
|
|
data_type: 'richtext',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
type: 'text',
|
2016-02-17 18:36:33 +00:00
|
|
|
maxlength: 250,
|
2018-12-19 17:31:51 +00:00
|
|
|
null: true,
|
|
|
|
note: 'Notes are visible to agents only, never to customers.',
|
|
|
|
},
|
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {
|
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
null: true,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1500,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'role_ids',
|
|
|
|
display: 'Roles',
|
|
|
|
data_type: 'checkbox',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
default: '',
|
2016-02-17 18:36:33 +00:00
|
|
|
multiple: true,
|
2018-12-19 17:31:51 +00:00
|
|
|
null: false,
|
2016-02-17 18:36:33 +00:00
|
|
|
relation: 'Role',
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
Admin: {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1600,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
ObjectManager::Attribute.add(
|
2018-12-19 17:31:51 +00:00
|
|
|
force: true,
|
|
|
|
object: 'User',
|
|
|
|
name: 'active',
|
|
|
|
display: 'Active',
|
|
|
|
data_type: 'active',
|
2016-02-17 18:36:33 +00:00
|
|
|
data_option: {
|
2018-12-19 17:31:51 +00:00
|
|
|
null: true,
|
2016-02-17 18:36:33 +00:00
|
|
|
default: true,
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
editable: false,
|
|
|
|
active: true,
|
|
|
|
screens: {
|
|
|
|
signup: {},
|
|
|
|
invite_agent: {},
|
2016-02-17 18:36:33 +00:00
|
|
|
invite_customer: {},
|
2018-12-19 17:31:51 +00:00
|
|
|
edit: {
|
2016-02-17 18:36:33 +00:00
|
|
|
Admin: {
|
|
|
|
null: false,
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
view: {
|
2016-02-17 18:36:33 +00:00
|
|
|
'-all-' => {
|
|
|
|
shown: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2018-12-19 17:31:51 +00:00
|
|
|
to_create: false,
|
|
|
|
to_migrate: false,
|
|
|
|
to_delete: false,
|
|
|
|
position: 1800,
|
2016-02-17 18:36:33 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|