settings.rb 82 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573
  1. Setting.create_if_not_exists(
  2. title: 'Application secret',
  3. name: 'application_secret',
  4. area: 'Core',
  5. description: 'Defines the random application secret.',
  6. options: {},
  7. state: SecureRandom.hex(128),
  8. preferences: {
  9. permission: ['admin'],
  10. },
  11. frontend: false
  12. )
  13. Setting.create_if_not_exists(
  14. title: 'System Init Done',
  15. name: 'system_init_done',
  16. area: 'Core',
  17. description: 'Defines if application is in init mode.',
  18. options: {},
  19. state: false,
  20. preferences: { online_service_disable: true },
  21. frontend: true
  22. )
  23. Setting.create_if_not_exists(
  24. title: 'App Version',
  25. name: 'app_version',
  26. area: 'Core::WebApp',
  27. description: 'Only used internally to propagate current web app version to clients.',
  28. options: {},
  29. state: '',
  30. preferences: { online_service_disable: true },
  31. frontend: false
  32. )
  33. Setting.create_if_not_exists(
  34. title: 'Maintenance Mode',
  35. name: 'maintenance_mode',
  36. area: 'Core::WebApp',
  37. description: 'Enable or disable the maintenance mode of Zammad. If enabled, all non-administrators get logged out and only administrators can start a new session.',
  38. options: {},
  39. state: false,
  40. preferences: {
  41. permission: ['admin.maintenance'],
  42. },
  43. frontend: true
  44. )
  45. Setting.create_if_not_exists(
  46. title: 'Maintenance Login',
  47. name: 'maintenance_login',
  48. area: 'Core::WebApp',
  49. description: 'Put a message on the login page. To change it, click on the text area below and change it inline.',
  50. options: {},
  51. state: false,
  52. preferences: {
  53. permission: ['admin.maintenance'],
  54. },
  55. frontend: true
  56. )
  57. Setting.create_if_not_exists(
  58. title: 'Maintenance Login',
  59. name: 'maintenance_login_message',
  60. area: 'Core::WebApp',
  61. description: 'Message for login page.',
  62. options: {},
  63. state: 'Something about to share. Click here to change.',
  64. preferences: {
  65. permission: ['admin.maintenance'],
  66. },
  67. frontend: true
  68. )
  69. Setting.create_if_not_exists(
  70. title: 'Developer System',
  71. name: 'developer_mode',
  72. area: 'Core::Develop',
  73. description: 'Defines if application is in developer mode (useful for developer, all users have the same password, password reset will work without email delivery).',
  74. options: {},
  75. state: false,
  76. preferences: { online_service_disable: true },
  77. frontend: true
  78. )
  79. Setting.create_if_not_exists(
  80. title: 'Online Service',
  81. name: 'system_online_service',
  82. area: 'Core',
  83. description: 'Defines if application is used as online service.',
  84. options: {},
  85. state: false,
  86. preferences: { online_service_disable: true },
  87. frontend: true
  88. )
  89. Setting.create_if_not_exists(
  90. title: 'Product Name',
  91. name: 'product_name',
  92. area: 'System::Branding',
  93. description: 'Defines the name of the application, shown in the web interface, tabs and title bar of the web browser.',
  94. options: {
  95. form: [
  96. {
  97. display: '',
  98. null: false,
  99. name: 'product_name',
  100. tag: 'input',
  101. },
  102. ],
  103. },
  104. preferences: {
  105. render: true,
  106. prio: 1,
  107. placeholder: true,
  108. permission: ['admin.branding'],
  109. },
  110. state: 'Zammad Helpdesk',
  111. frontend: true
  112. )
  113. Setting.create_if_not_exists(
  114. title: 'Logo',
  115. name: 'product_logo',
  116. area: 'System::Branding',
  117. description: 'Defines the logo of the application, shown in the web interface.',
  118. options: {
  119. form: [
  120. {
  121. display: '',
  122. null: false,
  123. name: 'product_logo',
  124. tag: 'input',
  125. },
  126. ],
  127. },
  128. preferences: {
  129. prio: 3,
  130. controller: 'SettingsAreaLogo',
  131. permission: ['admin.branding'],
  132. },
  133. state: 'logo.svg',
  134. frontend: true
  135. )
  136. Setting.create_if_not_exists(
  137. title: 'Organization',
  138. name: 'organization',
  139. area: 'System::Branding',
  140. description: 'Will be shown in the app and is included in email footers.',
  141. options: {
  142. form: [
  143. {
  144. display: '',
  145. null: false,
  146. name: 'organization',
  147. tag: 'input',
  148. },
  149. ],
  150. },
  151. state: '',
  152. preferences: {
  153. prio: 2,
  154. placeholder: true,
  155. permission: ['admin.branding'],
  156. },
  157. frontend: true
  158. )
  159. Setting.create_if_not_exists(
  160. title: 'Locale',
  161. name: 'locale_default',
  162. area: 'System::Branding',
  163. description: 'Defines the system default language.',
  164. options: {
  165. form: [
  166. {
  167. name: 'locale_default',
  168. }
  169. ],
  170. },
  171. state: 'en-us',
  172. preferences: {
  173. prio: 8,
  174. controller: 'SettingsAreaItemDefaultLocale',
  175. permission: ['admin.system'],
  176. },
  177. frontend: true
  178. )
  179. Setting.create_or_update(
  180. title: 'Pretty Date',
  181. name: 'pretty_date_format',
  182. area: 'System::Branding',
  183. description: 'Defines pretty date format.',
  184. options: {
  185. form: [
  186. {
  187. display: '',
  188. null: false,
  189. name: 'pretty_date_format',
  190. tag: 'select',
  191. options: {
  192. 'relative': 'relative - e. g. "2 hours ago" or "2 days and 15 minutes ago"',
  193. 'absolute': 'absolute - e. g. "Monday 09:30" or "Tuesday 23. Feb 14:20"',
  194. },
  195. },
  196. ],
  197. },
  198. preferences: {
  199. render: true,
  200. prio: 10,
  201. permission: ['admin.branding'],
  202. },
  203. state: 'relative',
  204. frontend: true
  205. )
  206. options = {}
  207. (10..99).each do |item|
  208. options[item] = item
  209. end
  210. system_id = rand(10..99)
  211. Setting.create_if_not_exists(
  212. title: 'SystemID',
  213. name: 'system_id',
  214. area: 'System::Base',
  215. description: 'Defines the system identifier. Every ticket number contains this ID. This ensures that only tickets which belong to your system will be processed as follow-ups (useful when communicating between two instances of Zammad).',
  216. options: {
  217. form: [
  218. {
  219. display: '',
  220. null: true,
  221. name: 'system_id',
  222. tag: 'select',
  223. options: options,
  224. },
  225. ],
  226. },
  227. state: system_id,
  228. preferences: {
  229. online_service_disable: true,
  230. placeholder: true,
  231. authentication: true,
  232. permission: ['admin.system'],
  233. },
  234. frontend: true
  235. )
  236. Setting.create_if_not_exists(
  237. title: 'Fully Qualified Domain Name',
  238. name: 'fqdn',
  239. area: 'System::Base',
  240. description: 'Defines the fully qualified domain name of the system. This setting is used as a variable, #{setting.fqdn} which is found in all forms of messaging used by the application, to build links to the tickets within your system.', # rubocop:disable Lint/InterpolationCheck
  241. options: {
  242. form: [
  243. {
  244. display: '',
  245. null: false,
  246. name: 'fqdn',
  247. tag: 'input',
  248. },
  249. ],
  250. },
  251. state: 'zammad.example.com',
  252. preferences: {
  253. online_service_disable: true,
  254. placeholder: true,
  255. permission: ['admin.system'],
  256. },
  257. frontend: true
  258. )
  259. Setting.create_if_not_exists(
  260. title: 'Websocket port',
  261. name: 'websocket_port',
  262. area: 'System::WebSocket',
  263. description: 'Defines the port of the websocket server.',
  264. options: {
  265. form: [
  266. {
  267. display: '',
  268. null: false,
  269. name: 'websocket_port',
  270. tag: 'input',
  271. },
  272. ],
  273. },
  274. state: '6042',
  275. preferences: { online_service_disable: true },
  276. frontend: true
  277. )
  278. Setting.create_if_not_exists(
  279. title: 'HTTP type',
  280. name: 'http_type',
  281. area: 'System::Base',
  282. description: 'Define the http protocol of your instance.',
  283. options: {
  284. form: [
  285. {
  286. display: '',
  287. null: true,
  288. name: 'http_type',
  289. tag: 'select',
  290. options: {
  291. 'https' => 'https',
  292. 'http' => 'http',
  293. },
  294. },
  295. ],
  296. },
  297. state: 'http',
  298. preferences: {
  299. online_service_disable: true,
  300. placeholder: true,
  301. permission: ['admin.system'],
  302. },
  303. frontend: true
  304. )
  305. Setting.create_if_not_exists(
  306. title: 'Storage Mechanism',
  307. name: 'storage_provider',
  308. area: 'System::Storage',
  309. description: '"Database" stores all attachments in the database (not recommended for storing large amounts of data). "Filesystem" stores the data in the filesystem. You can switch between the modules even on a system that is already in production without any loss of data.',
  310. options: {
  311. form: [
  312. {
  313. display: '',
  314. null: true,
  315. name: 'storage_provider',
  316. tag: 'select',
  317. tranlate: true,
  318. options: {
  319. 'DB' => 'Database',
  320. 'File' => 'Filesystem',
  321. },
  322. },
  323. ],
  324. },
  325. state: 'DB',
  326. preferences: {
  327. controller: 'SettingsAreaStorageProvider',
  328. online_service_disable: true,
  329. permission: ['admin.system'],
  330. },
  331. frontend: false
  332. )
  333. Setting.create_if_not_exists(
  334. title: 'Image Service',
  335. name: 'image_backend',
  336. area: 'System::Services',
  337. description: 'Defines the backend for user and organization image lookups.',
  338. options: {
  339. form: [
  340. {
  341. display: '',
  342. null: true,
  343. name: 'image_backend',
  344. tag: 'select',
  345. options: {
  346. '' => '-',
  347. 'Service::Image::Zammad' => 'Zammad Image Service',
  348. },
  349. },
  350. ],
  351. },
  352. state: 'Service::Image::Zammad',
  353. preferences: {
  354. prio: 1,
  355. permission: ['admin.system'],
  356. },
  357. frontend: false
  358. )
  359. Setting.create_if_not_exists(
  360. title: 'Geo IP Service',
  361. name: 'geo_ip_backend',
  362. area: 'System::Services',
  363. description: 'Defines the backend for geo IP lookups. Shows also location of an IP address if an IP address is shown.',
  364. options: {
  365. form: [
  366. {
  367. display: '',
  368. null: true,
  369. name: 'geo_ip_backend',
  370. tag: 'select',
  371. options: {
  372. '' => '-',
  373. 'Service::GeoIp::Zammad' => 'Zammad GeoIP Service',
  374. },
  375. },
  376. ],
  377. },
  378. state: 'Service::GeoIp::Zammad',
  379. preferences: {
  380. prio: 2,
  381. permission: ['admin.system'],
  382. },
  383. frontend: false
  384. )
  385. Setting.create_if_not_exists(
  386. title: 'Geo Location Service',
  387. name: 'geo_location_backend',
  388. area: 'System::Services',
  389. description: 'Defines the backend for geo location lookups to store geo locations for addresses.',
  390. options: {
  391. form: [
  392. {
  393. display: '',
  394. null: true,
  395. name: 'geo_location_backend',
  396. tag: 'select',
  397. options: {
  398. '' => '-',
  399. 'Service::GeoLocation::Gmaps' => 'Google Maps',
  400. },
  401. },
  402. ],
  403. },
  404. state: 'Service::GeoLocation::Gmaps',
  405. preferences: {
  406. prio: 3,
  407. permission: ['admin.system'],
  408. },
  409. frontend: false
  410. )
  411. Setting.create_if_not_exists(
  412. title: 'Geo Calendar Service',
  413. name: 'geo_calendar_backend',
  414. area: 'System::Services',
  415. description: 'Defines the backend for geo calendar lookups. Used for initial calendar succession.',
  416. options: {
  417. form: [
  418. {
  419. display: '',
  420. null: true,
  421. name: 'geo_calendar_backend',
  422. tag: 'select',
  423. options: {
  424. '' => '-',
  425. 'Service::GeoCalendar::Zammad' => 'Zammad GeoCalendar Service',
  426. },
  427. },
  428. ],
  429. },
  430. state: 'Service::GeoCalendar::Zammad',
  431. preferences: {
  432. prio: 2,
  433. permission: ['admin.system'],
  434. },
  435. frontend: false
  436. )
  437. Setting.create_if_not_exists(
  438. title: 'Proxy Settings',
  439. name: 'proxy',
  440. area: 'System::Network',
  441. description: 'Address of the proxy server for http and https resources.',
  442. options: {
  443. form: [
  444. {
  445. display: '',
  446. null: false,
  447. name: 'proxy',
  448. tag: 'input',
  449. placeholder: 'proxy.example.com:3128',
  450. },
  451. ],
  452. },
  453. state: '',
  454. preferences: {
  455. online_service_disable: true,
  456. controller: 'SettingsAreaProxy',
  457. prio: 1,
  458. permission: ['admin.system'],
  459. },
  460. frontend: false
  461. )
  462. Setting.create_if_not_exists(
  463. title: 'Proxy User',
  464. name: 'proxy_username',
  465. area: 'System::Network',
  466. description: 'Username for proxy connection.',
  467. options: {
  468. form: [
  469. {
  470. display: '',
  471. null: false,
  472. name: 'proxy_username',
  473. tag: 'input',
  474. },
  475. ],
  476. },
  477. state: '',
  478. preferences: {
  479. disabled: true,
  480. online_service_disable: true,
  481. prio: 2,
  482. permission: ['admin.system'],
  483. },
  484. frontend: false
  485. )
  486. Setting.create_if_not_exists(
  487. title: 'Proxy Password',
  488. name: 'proxy_password',
  489. area: 'System::Network',
  490. description: 'Password for proxy connection.',
  491. options: {
  492. form: [
  493. {
  494. display: '',
  495. null: false,
  496. name: 'proxy_password',
  497. tag: 'input',
  498. },
  499. ],
  500. },
  501. state: '',
  502. preferences: {
  503. disabled: true,
  504. online_service_disable: true,
  505. prio: 3,
  506. permission: ['admin.system'],
  507. },
  508. frontend: false
  509. )
  510. Setting.create_if_not_exists(
  511. title: 'No Proxy',
  512. name: 'proxy_no',
  513. area: 'System::Network',
  514. description: 'No proxy for the following hosts.',
  515. options: {
  516. form: [
  517. {
  518. display: '',
  519. null: false,
  520. name: 'proxy_no',
  521. tag: 'input',
  522. },
  523. ],
  524. },
  525. state: 'localhost,127.0.0.0,::1',
  526. preferences: {
  527. disabled: true,
  528. online_service_disable: true,
  529. prio: 4,
  530. permission: ['admin.system'],
  531. },
  532. frontend: false
  533. )
  534. Setting.create_if_not_exists(
  535. title: 'Send client stats',
  536. name: 'ui_send_client_stats',
  537. area: 'System::UI',
  538. description: 'Send client stats/error message to central server to improve the usability.',
  539. options: {
  540. form: [
  541. {
  542. display: '',
  543. null: true,
  544. name: 'ui_send_client_stats',
  545. tag: 'boolean',
  546. options: {
  547. true => 'yes',
  548. false => 'no',
  549. },
  550. },
  551. ],
  552. },
  553. state: false,
  554. preferences: {
  555. prio: 1,
  556. permission: ['admin.system'],
  557. },
  558. frontend: true
  559. )
  560. Setting.create_if_not_exists(
  561. title: 'Client storage',
  562. name: 'ui_client_storage',
  563. area: 'System::UI',
  564. description: 'Use client storage to cache data to enhance performance of application.',
  565. options: {
  566. form: [
  567. {
  568. display: '',
  569. null: true,
  570. name: 'ui_client_storage',
  571. tag: 'boolean',
  572. options: {
  573. true => 'yes',
  574. false => 'no',
  575. },
  576. },
  577. ],
  578. },
  579. state: false,
  580. preferences: {
  581. prio: 2,
  582. permission: ['admin.system'],
  583. },
  584. frontend: true
  585. )
  586. Setting.create_if_not_exists(
  587. title: 'Note - default visibility',
  588. name: 'ui_ticket_zoom_article_note_new_internal',
  589. area: 'UI::TicketZoom',
  590. description: 'Default visibility for new note.',
  591. options: {
  592. form: [
  593. {
  594. display: '',
  595. null: true,
  596. name: 'ui_ticket_zoom_article_note_new_internal',
  597. tag: 'boolean',
  598. translate: true,
  599. options: {
  600. true => 'internal',
  601. false => 'public',
  602. },
  603. },
  604. ],
  605. },
  606. state: true,
  607. preferences: {
  608. prio: 100,
  609. permission: ['admin.ui'],
  610. },
  611. frontend: true
  612. )
  613. Setting.create_if_not_exists(
  614. title: 'Email - subject field',
  615. name: 'ui_ticket_zoom_article_email_subject',
  616. area: 'UI::TicketZoom',
  617. description: 'Use subject field for emails. If disabled, the ticket title will be used as subject.',
  618. options: {
  619. form: [
  620. {
  621. display: '',
  622. null: true,
  623. name: 'ui_ticket_zoom_article_email_subject',
  624. tag: 'boolean',
  625. translate: true,
  626. options: {
  627. true => 'yes',
  628. false => 'no',
  629. },
  630. },
  631. ],
  632. },
  633. state: false,
  634. preferences: {
  635. prio: 200,
  636. permission: ['admin.ui'],
  637. },
  638. frontend: true
  639. )
  640. Setting.create_if_not_exists(
  641. title: 'Email - full quote',
  642. name: 'ui_ticket_zoom_article_email_full_quote',
  643. area: 'UI::TicketZoom',
  644. description: 'Enable if you want to quote the full email in your answer. The quoted email will be put at the end of your answer. If you just want to quote a certain phrase, just mark the text and press reply (this feature is always available).',
  645. options: {
  646. form: [
  647. {
  648. display: '',
  649. null: true,
  650. name: 'ui_ticket_zoom_article_email_full_quote',
  651. tag: 'boolean',
  652. translate: true,
  653. options: {
  654. true => 'yes',
  655. false => 'no',
  656. },
  657. },
  658. ],
  659. },
  660. state: false,
  661. preferences: {
  662. prio: 220,
  663. permission: ['admin.ui'],
  664. },
  665. frontend: true
  666. )
  667. Setting.create_if_not_exists(
  668. title: 'Twitter - tweet initials',
  669. name: 'ui_ticket_zoom_article_twitter_initials',
  670. area: 'UI::TicketZoom',
  671. description: 'Add sender initials to end of a tweet.',
  672. options: {
  673. form: [
  674. {
  675. display: '',
  676. null: true,
  677. name: 'ui_ticket_zoom_article_twitter_initials',
  678. tag: 'boolean',
  679. translate: true,
  680. options: {
  681. true => 'yes',
  682. false => 'no',
  683. },
  684. },
  685. ],
  686. },
  687. state: true,
  688. preferences: {
  689. prio: 300,
  690. permission: ['admin.ui'],
  691. },
  692. frontend: true
  693. )
  694. Setting.create_if_not_exists(
  695. title: 'New User Accounts',
  696. name: 'user_create_account',
  697. area: 'Security::Base',
  698. description: 'Enables users to create their own account via web interface.',
  699. options: {
  700. form: [
  701. {
  702. display: '',
  703. null: true,
  704. name: 'user_create_account',
  705. tag: 'boolean',
  706. options: {
  707. true => 'yes',
  708. false => 'no',
  709. },
  710. },
  711. ],
  712. },
  713. state: true,
  714. preferences: {
  715. permission: ['admin.security'],
  716. },
  717. frontend: true
  718. )
  719. Setting.create_if_not_exists(
  720. title: 'Lost Password',
  721. name: 'user_lost_password',
  722. area: 'Security::Base',
  723. description: 'Activates lost password feature for users.',
  724. options: {
  725. form: [
  726. {
  727. display: '',
  728. null: true,
  729. name: 'user_lost_password',
  730. tag: 'boolean',
  731. options: {
  732. true => 'yes',
  733. false => 'no',
  734. },
  735. },
  736. ],
  737. },
  738. state: true,
  739. preferences: {
  740. permission: ['admin.security'],
  741. },
  742. frontend: true
  743. )
  744. Setting.create_if_not_exists(
  745. title: 'User email for muliple users',
  746. name: 'user_email_multiple_use',
  747. area: 'Model::User',
  748. description: 'Allow to use email address for muliple users.',
  749. options: {
  750. form: [
  751. {
  752. display: '',
  753. null: true,
  754. name: 'user_email_multiple_use',
  755. tag: 'boolean',
  756. options: {
  757. true => 'yes',
  758. false => 'no',
  759. },
  760. },
  761. ],
  762. },
  763. state: false,
  764. preferences: {
  765. permission: ['admin'],
  766. },
  767. frontend: false
  768. )
  769. Setting.create_if_not_exists(
  770. title: 'Authentication via %s',
  771. name: 'auth_ldap',
  772. area: 'Security::Authentication',
  773. description: 'Enables user authentication via %s.',
  774. preferences: {
  775. title_i18n: ['LDAP'],
  776. description_i18n: ['LDAP'],
  777. permission: ['admin.security'],
  778. },
  779. state: {
  780. adapter: 'Auth::Ldap',
  781. host: 'localhost',
  782. port: 389,
  783. bind_dn: 'cn=Manager,dc=example,dc=org',
  784. bind_pw: 'example',
  785. uid: 'mail',
  786. base: 'dc=example,dc=org',
  787. always_filter: '',
  788. always_roles: %w[Admin Agent],
  789. always_groups: ['Users'],
  790. sync_params: {
  791. firstname: 'sn',
  792. lastname: 'givenName',
  793. email: 'mail',
  794. login: 'mail',
  795. },
  796. },
  797. frontend: false
  798. )
  799. Setting.create_if_not_exists(
  800. title: 'Authentication via %s',
  801. name: 'auth_twitter',
  802. area: 'Security::ThirdPartyAuthentication',
  803. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  804. options: {
  805. form: [
  806. {
  807. display: '',
  808. null: true,
  809. name: 'auth_twitter',
  810. tag: 'boolean',
  811. options: {
  812. true => 'yes',
  813. false => 'no',
  814. },
  815. },
  816. ],
  817. },
  818. preferences: {
  819. controller: 'SettingsAreaSwitch',
  820. sub: ['auth_twitter_credentials'],
  821. title_i18n: ['Twitter'],
  822. description_i18n: ['Twitter', 'Twitter Developer Site', 'https://dev.twitter.com/apps'],
  823. permission: ['admin.security'],
  824. },
  825. state: false,
  826. frontend: true
  827. )
  828. Setting.create_if_not_exists(
  829. title: 'Twitter App Credentials',
  830. name: 'auth_twitter_credentials',
  831. area: 'Security::ThirdPartyAuthentication::Twitter',
  832. description: 'App credentials for Twitter.',
  833. options: {
  834. form: [
  835. {
  836. display: 'Twitter Key',
  837. null: true,
  838. name: 'key',
  839. tag: 'input',
  840. },
  841. {
  842. display: 'Twitter Secret',
  843. null: true,
  844. name: 'secret',
  845. tag: 'input',
  846. },
  847. ],
  848. },
  849. state: {},
  850. preferences: {
  851. permission: ['admin.security'],
  852. },
  853. frontend: false
  854. )
  855. Setting.create_if_not_exists(
  856. title: 'Authentication via %s',
  857. name: 'auth_facebook',
  858. area: 'Security::ThirdPartyAuthentication',
  859. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  860. options: {
  861. form: [
  862. {
  863. display: '',
  864. null: true,
  865. name: 'auth_facebook',
  866. tag: 'boolean',
  867. options: {
  868. true => 'yes',
  869. false => 'no',
  870. },
  871. },
  872. ],
  873. },
  874. preferences: {
  875. controller: 'SettingsAreaSwitch',
  876. sub: ['auth_facebook_credentials'],
  877. title_i18n: ['Facebook'],
  878. description_i18n: ['Facebook', 'Facebook Developer Site', 'https://developers.facebook.com/apps/'],
  879. permission: ['admin.security'],
  880. },
  881. state: false,
  882. frontend: true
  883. )
  884. Setting.create_if_not_exists(
  885. title: 'Facebook App Credentials',
  886. name: 'auth_facebook_credentials',
  887. area: 'Security::ThirdPartyAuthentication::Facebook',
  888. description: 'App credentials for Facebook.',
  889. options: {
  890. form: [
  891. {
  892. display: 'App ID',
  893. null: true,
  894. name: 'app_id',
  895. tag: 'input',
  896. },
  897. {
  898. display: 'App Secret',
  899. null: true,
  900. name: 'app_secret',
  901. tag: 'input',
  902. },
  903. ],
  904. },
  905. state: {},
  906. preferences: {
  907. permission: ['admin.security'],
  908. },
  909. frontend: false
  910. )
  911. Setting.create_if_not_exists(
  912. title: 'Authentication via %s',
  913. name: 'auth_google_oauth2',
  914. area: 'Security::ThirdPartyAuthentication',
  915. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  916. options: {
  917. form: [
  918. {
  919. display: '',
  920. null: true,
  921. name: 'auth_google_oauth2',
  922. tag: 'boolean',
  923. options: {
  924. true => 'yes',
  925. false => 'no',
  926. },
  927. },
  928. ],
  929. },
  930. preferences: {
  931. controller: 'SettingsAreaSwitch',
  932. sub: ['auth_google_oauth2_credentials'],
  933. title_i18n: ['Google'],
  934. description_i18n: ['Google', 'Google API Console Site', 'https://console.developers.google.com/apis/credentials'],
  935. permission: ['admin.security'],
  936. },
  937. state: false,
  938. frontend: true
  939. )
  940. Setting.create_if_not_exists(
  941. title: 'Google App Credentials',
  942. name: 'auth_google_oauth2_credentials',
  943. area: 'Security::ThirdPartyAuthentication::Google',
  944. description: 'Enables user authentication via Google.',
  945. options: {
  946. form: [
  947. {
  948. display: 'Client ID',
  949. null: true,
  950. name: 'client_id',
  951. tag: 'input',
  952. },
  953. {
  954. display: 'Client Secret',
  955. null: true,
  956. name: 'client_secret',
  957. tag: 'input',
  958. },
  959. ],
  960. },
  961. state: {},
  962. preferences: {
  963. permission: ['admin.security'],
  964. },
  965. frontend: false
  966. )
  967. Setting.create_if_not_exists(
  968. title: 'Authentication via %s',
  969. name: 'auth_linkedin',
  970. area: 'Security::ThirdPartyAuthentication',
  971. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  972. options: {
  973. form: [
  974. {
  975. display: '',
  976. null: true,
  977. name: 'auth_linkedin',
  978. tag: 'boolean',
  979. options: {
  980. true => 'yes',
  981. false => 'no',
  982. },
  983. },
  984. ],
  985. },
  986. preferences: {
  987. controller: 'SettingsAreaSwitch',
  988. sub: ['auth_linkedin_credentials'],
  989. title_i18n: ['LinkedIn'],
  990. description_i18n: ['LinkedIn', 'Linkedin Developer Site', 'https://www.linkedin.com/developer/apps'],
  991. permission: ['admin.security'],
  992. },
  993. state: false,
  994. frontend: true
  995. )
  996. Setting.create_if_not_exists(
  997. title: 'LinkedIn App Credentials',
  998. name: 'auth_linkedin_credentials',
  999. area: 'Security::ThirdPartyAuthentication::Linkedin',
  1000. description: 'Enables user authentication via LinkedIn.',
  1001. options: {
  1002. form: [
  1003. {
  1004. display: 'App ID',
  1005. null: true,
  1006. name: 'app_id',
  1007. tag: 'input',
  1008. },
  1009. {
  1010. display: 'App Secret',
  1011. null: true,
  1012. name: 'app_secret',
  1013. tag: 'input',
  1014. },
  1015. ],
  1016. },
  1017. state: {},
  1018. preferences: {
  1019. permission: ['admin.security'],
  1020. },
  1021. frontend: false
  1022. )
  1023. Setting.create_if_not_exists(
  1024. title: 'Authentication via %s',
  1025. name: 'auth_github',
  1026. area: 'Security::ThirdPartyAuthentication',
  1027. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  1028. options: {
  1029. form: [
  1030. {
  1031. display: '',
  1032. null: true,
  1033. name: 'auth_github',
  1034. tag: 'boolean',
  1035. options: {
  1036. true => 'yes',
  1037. false => 'no',
  1038. },
  1039. },
  1040. ],
  1041. },
  1042. preferences: {
  1043. controller: 'SettingsAreaSwitch',
  1044. sub: ['auth_github_credentials'],
  1045. title_i18n: ['Github'],
  1046. description_i18n: ['Github', 'Github OAuth Applications', 'https://github.com/settings/applications'],
  1047. permission: ['admin.security'],
  1048. },
  1049. state: false,
  1050. frontend: true
  1051. )
  1052. Setting.create_if_not_exists(
  1053. title: 'Github App Credentials',
  1054. name: 'auth_github_credentials',
  1055. area: 'Security::ThirdPartyAuthentication::Github',
  1056. description: 'Enables user authentication via Github.',
  1057. options: {
  1058. form: [
  1059. {
  1060. display: 'App ID',
  1061. null: true,
  1062. name: 'app_id',
  1063. tag: 'input',
  1064. },
  1065. {
  1066. display: 'App Secret',
  1067. null: true,
  1068. name: 'app_secret',
  1069. tag: 'input',
  1070. },
  1071. ],
  1072. },
  1073. state: {},
  1074. preferences: {
  1075. permission: ['admin.security'],
  1076. },
  1077. frontend: false
  1078. )
  1079. Setting.create_if_not_exists(
  1080. title: 'Authentication via %s',
  1081. name: 'auth_gitlab',
  1082. area: 'Security::ThirdPartyAuthentication',
  1083. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  1084. options: {
  1085. form: [
  1086. {
  1087. display: '',
  1088. null: true,
  1089. name: 'auth_gitlab',
  1090. tag: 'boolean',
  1091. options: {
  1092. true => 'yes',
  1093. false => 'no',
  1094. },
  1095. },
  1096. ],
  1097. },
  1098. preferences: {
  1099. controller: 'SettingsAreaSwitch',
  1100. sub: ['auth_gitlab_credentials'],
  1101. title_i18n: ['Gitlab'],
  1102. description_i18n: ['Gitlab', 'Gitlab Applications', 'https://your-gitlab-host/admin/applications'],
  1103. permission: ['admin.security'],
  1104. },
  1105. state: false,
  1106. frontend: true
  1107. )
  1108. Setting.create_if_not_exists(
  1109. title: 'Gitlab App Credentials',
  1110. name: 'auth_gitlab_credentials',
  1111. area: 'Security::ThirdPartyAuthentication::Gitlab',
  1112. description: 'Enables user authentication via Gitlab.',
  1113. options: {
  1114. form: [
  1115. {
  1116. display: 'App ID',
  1117. null: true,
  1118. name: 'app_id',
  1119. tag: 'input',
  1120. },
  1121. {
  1122. display: 'App Secret',
  1123. null: true,
  1124. name: 'app_secret',
  1125. tag: 'input',
  1126. },
  1127. {
  1128. display: 'Site',
  1129. null: true,
  1130. name: 'site',
  1131. tag: 'input',
  1132. placeholder: 'https://gitlab.YOURDOMAIN.com',
  1133. },
  1134. ],
  1135. },
  1136. state: {},
  1137. preferences: {
  1138. permission: ['admin.security'],
  1139. },
  1140. frontend: false
  1141. )
  1142. Setting.create_if_not_exists(
  1143. title: 'Authentication via %s',
  1144. name: 'auth_microsoft_office365',
  1145. area: 'Security::ThirdPartyAuthentication',
  1146. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  1147. options: {
  1148. form: [
  1149. {
  1150. display: '',
  1151. null: true,
  1152. name: 'auth_microsoft_office365',
  1153. tag: 'boolean',
  1154. options: {
  1155. true => 'yes',
  1156. false => 'no',
  1157. },
  1158. },
  1159. ],
  1160. },
  1161. preferences: {
  1162. controller: 'SettingsAreaSwitch',
  1163. sub: ['auth_microsoft_office365_credentials'],
  1164. title_i18n: ['Office 365'],
  1165. description_i18n: ['Office 365', 'Microsoft Application Registration Portal', 'https://apps.dev.microsoft.com'],
  1166. permission: ['admin.security'],
  1167. },
  1168. state: false,
  1169. frontend: true
  1170. )
  1171. Setting.create_if_not_exists(
  1172. title: 'Office 365 App Credentials',
  1173. name: 'auth_microsoft_office365_credentials',
  1174. area: 'Security::ThirdPartyAuthentication::Office365',
  1175. description: 'Enables user authentication via Office 365.',
  1176. options: {
  1177. form: [
  1178. {
  1179. display: 'App ID',
  1180. null: true,
  1181. name: 'app_id',
  1182. tag: 'input',
  1183. },
  1184. {
  1185. display: 'App Secret',
  1186. null: true,
  1187. name: 'app_secret',
  1188. tag: 'input',
  1189. },
  1190. ],
  1191. },
  1192. state: {},
  1193. preferences: {
  1194. permission: ['admin.security'],
  1195. },
  1196. frontend: false
  1197. )
  1198. Setting.create_if_not_exists(
  1199. title: 'Authentication via %s',
  1200. name: 'auth_oauth2',
  1201. area: 'Security::ThirdPartyAuthentication',
  1202. description: 'Enables user authentication via generic OAuth2. Register your app first.',
  1203. options: {
  1204. form: [
  1205. {
  1206. display: '',
  1207. null: true,
  1208. name: 'auth_oauth2',
  1209. tag: 'boolean',
  1210. options: {
  1211. true => 'yes',
  1212. false => 'no',
  1213. },
  1214. },
  1215. ],
  1216. },
  1217. preferences: {
  1218. controller: 'SettingsAreaSwitch',
  1219. sub: ['auth_oauth2_credentials'],
  1220. title_i18n: ['Generic OAuth2'],
  1221. permission: ['admin.security'],
  1222. },
  1223. state: false,
  1224. frontend: true
  1225. )
  1226. Setting.create_if_not_exists(
  1227. title: 'Generic OAuth2 App Credentials',
  1228. name: 'auth_oauth2_credentials',
  1229. area: 'Security::ThirdPartyAuthentication::GenericOAuth',
  1230. description: 'Enables user authentication via generic OAuth2.',
  1231. options: {
  1232. form: [
  1233. {
  1234. display: 'Name',
  1235. null: true,
  1236. name: 'name',
  1237. tag: 'input',
  1238. placeholder: 'Some Provider Name',
  1239. },
  1240. {
  1241. display: 'App ID',
  1242. null: true,
  1243. name: 'app_id',
  1244. tag: 'input',
  1245. },
  1246. {
  1247. display: 'App Secret',
  1248. null: true,
  1249. name: 'app_secret',
  1250. tag: 'input',
  1251. },
  1252. {
  1253. display: 'Site',
  1254. null: true,
  1255. name: 'site',
  1256. tag: 'input',
  1257. placeholder: 'https://oauth.YOURDOMAIN.com',
  1258. },
  1259. {
  1260. display: 'authorize_url',
  1261. null: true,
  1262. name: 'authorize_url',
  1263. tag: 'input',
  1264. placeholder: '/oauth/authorize',
  1265. },
  1266. {
  1267. display: 'token_url',
  1268. null: true,
  1269. name: 'token_url',
  1270. tag: 'input',
  1271. placeholder: '/oauth/token',
  1272. },
  1273. ],
  1274. },
  1275. state: {},
  1276. preferences: {
  1277. permission: ['admin.security'],
  1278. },
  1279. frontend: false
  1280. )
  1281. Setting.create_if_not_exists(
  1282. title: 'Authentication via %s',
  1283. name: 'auth_weibo',
  1284. area: 'Security::ThirdPartyAuthentication',
  1285. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  1286. options: {
  1287. form: [
  1288. {
  1289. display: '',
  1290. null: true,
  1291. name: 'auth_weibo',
  1292. tag: 'boolean',
  1293. options: {
  1294. true => 'yes',
  1295. false => 'no',
  1296. },
  1297. },
  1298. ],
  1299. },
  1300. preferences: {
  1301. controller: 'SettingsAreaSwitch',
  1302. sub: ['auth_weibo_credentials'],
  1303. title_i18n: ['Weibo'],
  1304. description_i18n: ['Sina Weibo', 'Sina Weibo Open Protal', 'http://open.weibo.com'],
  1305. permission: ['admin.security'],
  1306. },
  1307. state: false,
  1308. frontend: true
  1309. )
  1310. Setting.create_if_not_exists(
  1311. title: 'Weibo App Credentials',
  1312. name: 'auth_weibo_credentials',
  1313. area: 'Security::ThirdPartyAuthentication::Weibo',
  1314. description: 'Enables user authentication via Weibo.',
  1315. options: {
  1316. form: [
  1317. {
  1318. display: 'App ID',
  1319. null: true,
  1320. name: 'client_id',
  1321. tag: 'input',
  1322. },
  1323. {
  1324. display: 'App Secret',
  1325. null: true,
  1326. name: 'client_secret',
  1327. tag: 'input',
  1328. },
  1329. ],
  1330. },
  1331. state: {},
  1332. preferences: {
  1333. permission: ['admin.security'],
  1334. },
  1335. frontend: false
  1336. )
  1337. Setting.create_if_not_exists(
  1338. title: 'Minimum length',
  1339. name: 'password_min_size',
  1340. area: 'Security::Password',
  1341. description: 'Password needs to have at least a minimal number of characters.',
  1342. options: {
  1343. form: [
  1344. {
  1345. display: '',
  1346. null: true,
  1347. name: 'password_min_size',
  1348. tag: 'select',
  1349. options: {
  1350. 4 => ' 4',
  1351. 5 => ' 5',
  1352. 6 => ' 6',
  1353. 7 => ' 7',
  1354. 8 => ' 8',
  1355. 9 => ' 9',
  1356. 10 => '10',
  1357. 11 => '11',
  1358. 12 => '12',
  1359. 13 => '13',
  1360. 14 => '14',
  1361. 15 => '15',
  1362. 16 => '16',
  1363. 17 => '17',
  1364. 18 => '18',
  1365. 19 => '19',
  1366. 20 => '20',
  1367. },
  1368. },
  1369. ],
  1370. },
  1371. state: 6,
  1372. preferences: {
  1373. permission: ['admin.security'],
  1374. },
  1375. frontend: false
  1376. )
  1377. Setting.create_if_not_exists(
  1378. title: '2 lower and 2 upper characters',
  1379. name: 'password_min_2_lower_2_upper_characters',
  1380. area: 'Security::Password',
  1381. description: 'Password needs to contain 2 lower and 2 upper characters.',
  1382. options: {
  1383. form: [
  1384. {
  1385. display: '',
  1386. null: true,
  1387. name: 'password_min_2_lower_2_upper_characters',
  1388. tag: 'select',
  1389. options: {
  1390. 1 => 'yes',
  1391. 0 => 'no',
  1392. },
  1393. },
  1394. ],
  1395. },
  1396. state: 0,
  1397. preferences: {
  1398. permission: ['admin.security'],
  1399. },
  1400. frontend: false
  1401. )
  1402. Setting.create_if_not_exists(
  1403. title: 'Digit required',
  1404. name: 'password_need_digit',
  1405. area: 'Security::Password',
  1406. description: 'Password needs to contain at least one digit.',
  1407. options: {
  1408. form: [
  1409. {
  1410. display: 'Needed',
  1411. null: true,
  1412. name: 'password_need_digit',
  1413. tag: 'select',
  1414. options: {
  1415. 1 => 'yes',
  1416. 0 => 'no',
  1417. },
  1418. },
  1419. ],
  1420. },
  1421. state: 1,
  1422. preferences: {
  1423. permission: ['admin.security'],
  1424. },
  1425. frontend: false
  1426. )
  1427. Setting.create_if_not_exists(
  1428. title: 'Maximum failed logins',
  1429. name: 'password_max_login_failed',
  1430. area: 'Security::Password',
  1431. description: 'Number of failed logins after account will be deactivated.',
  1432. options: {
  1433. form: [
  1434. {
  1435. display: '',
  1436. null: true,
  1437. name: 'password_max_login_failed',
  1438. tag: 'select',
  1439. options: {
  1440. 4 => ' 4',
  1441. 5 => ' 5',
  1442. 6 => ' 6',
  1443. 7 => ' 7',
  1444. 8 => ' 8',
  1445. 9 => ' 9',
  1446. 10 => '10',
  1447. 11 => '11',
  1448. 13 => '13',
  1449. 14 => '14',
  1450. 15 => '15',
  1451. 16 => '16',
  1452. 17 => '17',
  1453. 18 => '18',
  1454. 19 => '19',
  1455. 20 => '20',
  1456. },
  1457. },
  1458. ],
  1459. },
  1460. state: 10,
  1461. preferences: {
  1462. permission: ['admin.security'],
  1463. },
  1464. frontend: false
  1465. )
  1466. Setting.create_if_not_exists(
  1467. title: 'Ticket Hook',
  1468. name: 'ticket_hook',
  1469. area: 'Ticket::Base',
  1470. description: 'The identifier for a ticket, e. g. Ticket#, Call#, MyTicket#. The default is Ticket#.',
  1471. options: {
  1472. form: [
  1473. {
  1474. display: '',
  1475. null: false,
  1476. name: 'ticket_hook',
  1477. tag: 'input',
  1478. },
  1479. ],
  1480. },
  1481. preferences: {
  1482. render: true,
  1483. placeholder: true,
  1484. authentication: true,
  1485. permission: ['admin.ticket'],
  1486. },
  1487. state: 'Ticket#',
  1488. frontend: true
  1489. )
  1490. Setting.create_if_not_exists(
  1491. title: 'Ticket Hook Divider',
  1492. name: 'ticket_hook_divider',
  1493. area: 'Ticket::Base::Shadow',
  1494. description: 'The divider between TicketHook and ticket number. E. g. \': \'.',
  1495. options: {
  1496. form: [
  1497. {
  1498. display: '',
  1499. null: true,
  1500. name: 'ticket_hook_divider',
  1501. tag: 'input',
  1502. },
  1503. ],
  1504. },
  1505. state: '',
  1506. preferences: {
  1507. permission: ['admin.ticket'],
  1508. },
  1509. frontend: false
  1510. )
  1511. Setting.create_if_not_exists(
  1512. title: 'Ticket Hook Position',
  1513. name: 'ticket_hook_position',
  1514. area: 'Ticket::Base',
  1515. description: "The format of the subject.
  1516. * **Right** means **Some Subject [Ticket#12345]**
  1517. * **Left** means **[Ticket#12345] Some Subject**
  1518. * **None** means **Some Subject** (without ticket number). In the last case you should enable *postmaster_follow_up_search_in* to recognize follow-ups based on email headers and/or body.",
  1519. options: {
  1520. form: [
  1521. {
  1522. display: '',
  1523. null: true,
  1524. name: 'ticket_hook_position',
  1525. tag: 'select',
  1526. translate: true,
  1527. options: {
  1528. 'left' => 'left',
  1529. 'right' => 'right',
  1530. 'none' => 'none',
  1531. },
  1532. },
  1533. ],
  1534. },
  1535. state: 'right',
  1536. preferences: {
  1537. controller: 'SettingsAreaTicketHookPosition',
  1538. permission: ['admin.ticket'],
  1539. },
  1540. frontend: false
  1541. )
  1542. Setting.create_if_not_exists(
  1543. title: 'Ticket Number Format',
  1544. name: 'ticket_number',
  1545. area: 'Ticket::Number',
  1546. description: "Selects the ticket number generator module.
  1547. * **Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  1548. * With **Date** the ticket numbers will be generated by the current date, the SystemID and the counter. The format looks like Year.Month.Day.SystemID.counter (e.g. 201206231010138, 201206231010139).",
  1549. options: {
  1550. form: [
  1551. {
  1552. display: '',
  1553. null: true,
  1554. name: 'ticket_number',
  1555. tag: 'select',
  1556. translate: true,
  1557. options: {
  1558. 'Ticket::Number::Increment' => 'Increment (SystemID.Counter)',
  1559. 'Ticket::Number::Date' => 'Date (Year.Month.Day.SystemID.Counter)',
  1560. },
  1561. },
  1562. ],
  1563. },
  1564. state: 'Ticket::Number::Increment',
  1565. preferences: {
  1566. settings_included: %w[ticket_number_increment ticket_number_date],
  1567. controller: 'SettingsAreaTicketNumber',
  1568. permission: ['admin.ticket'],
  1569. },
  1570. frontend: false
  1571. )
  1572. Setting.create_if_not_exists(
  1573. title: 'Ticket Number Increment',
  1574. name: 'ticket_number_increment',
  1575. area: 'Ticket::Number',
  1576. description: '-',
  1577. options: {
  1578. form: [
  1579. {
  1580. display: 'Checksum',
  1581. null: true,
  1582. name: 'checksum',
  1583. tag: 'boolean',
  1584. options: {
  1585. true => 'yes',
  1586. false => 'no',
  1587. },
  1588. },
  1589. {
  1590. display: 'Min. size of number',
  1591. null: true,
  1592. name: 'min_size',
  1593. tag: 'select',
  1594. options: {
  1595. 1 => ' 1',
  1596. 2 => ' 2',
  1597. 3 => ' 3',
  1598. 4 => ' 4',
  1599. 5 => ' 5',
  1600. 6 => ' 6',
  1601. 7 => ' 7',
  1602. 8 => ' 8',
  1603. 9 => ' 9',
  1604. 10 => '10',
  1605. 11 => '11',
  1606. 12 => '12',
  1607. 13 => '13',
  1608. 14 => '14',
  1609. 15 => '15',
  1610. 16 => '16',
  1611. 17 => '17',
  1612. 18 => '18',
  1613. 19 => '19',
  1614. 20 => '20',
  1615. },
  1616. },
  1617. ],
  1618. },
  1619. state: {
  1620. checksum: false,
  1621. min_size: 5,
  1622. },
  1623. preferences: {
  1624. permission: ['admin.ticket'],
  1625. hidden: true,
  1626. },
  1627. frontend: false
  1628. )
  1629. Setting.create_if_not_exists(
  1630. title: 'Ticket Number Increment Date',
  1631. name: 'ticket_number_date',
  1632. area: 'Ticket::Number',
  1633. description: '-',
  1634. options: {
  1635. form: [
  1636. {
  1637. display: 'Checksum',
  1638. null: true,
  1639. name: 'checksum',
  1640. tag: 'boolean',
  1641. options: {
  1642. true => 'yes',
  1643. false => 'no',
  1644. },
  1645. },
  1646. ],
  1647. },
  1648. state: {
  1649. checksum: false
  1650. },
  1651. preferences: {
  1652. permission: ['admin.ticket'],
  1653. hidden: true,
  1654. },
  1655. frontend: false
  1656. )
  1657. Setting.create_if_not_exists(
  1658. title: 'Ticket Number ignore system_id',
  1659. name: 'ticket_number_ignore_system_id',
  1660. area: 'Ticket::Core',
  1661. description: '-',
  1662. options: {
  1663. form: [
  1664. {
  1665. display: 'Ignore system_id',
  1666. null: true,
  1667. name: 'ticket_number_ignore_system_id',
  1668. tag: 'boolean',
  1669. options: {
  1670. true => 'yes',
  1671. false => 'no',
  1672. },
  1673. },
  1674. ],
  1675. },
  1676. state: {
  1677. ticket_number_ignore_system_id: false
  1678. },
  1679. preferences: {
  1680. permission: ['admin.ticket'],
  1681. hidden: true,
  1682. },
  1683. frontend: false
  1684. )
  1685. Setting.create_if_not_exists(
  1686. title: 'Enable Ticket creation',
  1687. name: 'customer_ticket_create',
  1688. area: 'CustomerWeb::Base',
  1689. description: 'Defines if a customer can create tickets via the web interface.',
  1690. options: {
  1691. form: [
  1692. {
  1693. display: '',
  1694. null: true,
  1695. name: 'customer_ticket_create',
  1696. tag: 'boolean',
  1697. options: {
  1698. true => 'yes',
  1699. false => 'no',
  1700. },
  1701. },
  1702. ],
  1703. },
  1704. state: true,
  1705. preferences: {
  1706. authentication: true,
  1707. permission: ['admin.channel_web'],
  1708. },
  1709. frontend: true
  1710. )
  1711. Setting.create_if_not_exists(
  1712. title: 'Group selection for Ticket creation',
  1713. name: 'customer_ticket_create_group_ids',
  1714. area: 'CustomerWeb::Base',
  1715. description: 'Defines groups for which a customer can create tickets via web interface. "-" means all groups are available.',
  1716. options: {
  1717. form: [
  1718. {
  1719. display: '',
  1720. null: true,
  1721. name: 'group_ids',
  1722. tag: 'select',
  1723. multiple: true,
  1724. nulloption: true,
  1725. relation: 'Group',
  1726. },
  1727. ],
  1728. },
  1729. state: '',
  1730. preferences: {
  1731. authentication: true,
  1732. permission: ['admin.channel_web'],
  1733. },
  1734. frontend: true
  1735. )
  1736. Setting.create_if_not_exists(
  1737. title: 'Enable Ticket creation',
  1738. name: 'form_ticket_create',
  1739. area: 'Form::Base',
  1740. description: 'Defines if tickets can be created via web form.',
  1741. options: {
  1742. form: [
  1743. {
  1744. display: '',
  1745. null: true,
  1746. name: 'form_ticket_create',
  1747. tag: 'boolean',
  1748. options: {
  1749. true => 'yes',
  1750. false => 'no',
  1751. },
  1752. },
  1753. ],
  1754. },
  1755. state: false,
  1756. preferences: {
  1757. permission: ['admin.channel_formular'],
  1758. },
  1759. frontend: false,
  1760. )
  1761. group = Group.where(active: true).first
  1762. if !group
  1763. group = Group.first
  1764. end
  1765. group_id = 1
  1766. if group
  1767. group_id = group.id
  1768. end
  1769. Setting.create_if_not_exists(
  1770. title: 'Group selection for Ticket creation',
  1771. name: 'form_ticket_create_group_id',
  1772. area: 'Form::Base',
  1773. description: 'Defines if group of created tickets via web form.',
  1774. options: {
  1775. form: [
  1776. {
  1777. display: '',
  1778. null: true,
  1779. name: 'form_ticket_create_group_id',
  1780. tag: 'select',
  1781. relation: 'Group',
  1782. },
  1783. ],
  1784. },
  1785. state: group_id,
  1786. preferences: {
  1787. permission: ['admin.channel_formular'],
  1788. },
  1789. frontend: false,
  1790. )
  1791. Setting.create_if_not_exists(
  1792. title: 'Limit tickets by ip per hour',
  1793. name: 'form_ticket_create_by_ip_per_hour',
  1794. area: 'Form::Base',
  1795. description: 'Defines limit of tickets by ip per hour via web form.',
  1796. options: {
  1797. form: [
  1798. {
  1799. display: '',
  1800. null: true,
  1801. name: 'form_ticket_create_by_ip_per_hour',
  1802. tag: 'input',
  1803. },
  1804. ],
  1805. },
  1806. state: 20,
  1807. preferences: {
  1808. permission: ['admin.channel_formular'],
  1809. },
  1810. frontend: false,
  1811. )
  1812. Setting.create_if_not_exists(
  1813. title: 'Limit tickets by ip per day',
  1814. name: 'form_ticket_create_by_ip_per_day',
  1815. area: 'Form::Base',
  1816. description: 'Defines limit of tickets by ip per day via web form.',
  1817. options: {
  1818. form: [
  1819. {
  1820. display: '',
  1821. null: true,
  1822. name: 'form_ticket_create_by_ip_per_day',
  1823. tag: 'input',
  1824. },
  1825. ],
  1826. },
  1827. state: 240,
  1828. preferences: {
  1829. permission: ['admin.channel_formular'],
  1830. },
  1831. frontend: false,
  1832. )
  1833. Setting.create_if_not_exists(
  1834. title: 'Limit tickets per day',
  1835. name: 'form_ticket_create_per_day',
  1836. area: 'Form::Base',
  1837. description: 'Defines limit of tickets per day via web form.',
  1838. options: {
  1839. form: [
  1840. {
  1841. display: '',
  1842. null: true,
  1843. name: 'form_ticket_create_per_day',
  1844. tag: 'input',
  1845. },
  1846. ],
  1847. },
  1848. state: 5000,
  1849. preferences: {
  1850. permission: ['admin.channel_formular'],
  1851. },
  1852. frontend: false,
  1853. )
  1854. Setting.create_if_not_exists(
  1855. title: 'Ticket Subject Size',
  1856. name: 'ticket_subject_size',
  1857. area: 'Email::Base',
  1858. description: 'Max. length of the subject in an email reply.',
  1859. options: {
  1860. form: [
  1861. {
  1862. display: '',
  1863. null: false,
  1864. name: 'ticket_subject_size',
  1865. tag: 'input',
  1866. },
  1867. ],
  1868. },
  1869. state: '110',
  1870. preferences: {
  1871. permission: ['admin.channel_email'],
  1872. },
  1873. frontend: false
  1874. )
  1875. Setting.create_if_not_exists(
  1876. title: 'Ticket Subject Reply',
  1877. name: 'ticket_subject_re',
  1878. area: 'Email::Base',
  1879. description: 'The text at the beginning of the subject in an email reply, e. g. RE, AW, or AS.',
  1880. options: {
  1881. form: [
  1882. {
  1883. display: '',
  1884. null: true,
  1885. name: 'ticket_subject_re',
  1886. tag: 'input',
  1887. },
  1888. ],
  1889. },
  1890. state: 'RE',
  1891. preferences: {
  1892. permission: ['admin.channel_email'],
  1893. },
  1894. frontend: false
  1895. )
  1896. Setting.create_if_not_exists(
  1897. title: 'Sender Format',
  1898. name: 'ticket_define_email_from',
  1899. area: 'Email::Base',
  1900. description: 'Defines how the From field of emails (sent from answers and email tickets) should look like.',
  1901. options: {
  1902. form: [
  1903. {
  1904. display: '',
  1905. null: true,
  1906. name: 'ticket_define_email_from',
  1907. tag: 'select',
  1908. options: {
  1909. SystemAddressName: 'System Address Display Name',
  1910. AgentNameSystemAddressName: 'Agent Name + FromSeparator + System Address Display Name',
  1911. },
  1912. },
  1913. ],
  1914. },
  1915. state: 'AgentNameSystemAddressName',
  1916. preferences: {
  1917. permission: ['admin.channel_email'],
  1918. },
  1919. frontend: false
  1920. )
  1921. Setting.create_if_not_exists(
  1922. title: 'Sender Format Separator',
  1923. name: 'ticket_define_email_from_separator',
  1924. area: 'Email::Base',
  1925. description: 'Defines the separator between the agent\'s real name and the given group email address.',
  1926. options: {
  1927. form: [
  1928. {
  1929. display: '',
  1930. null: false,
  1931. name: 'ticket_define_email_from_separator',
  1932. tag: 'input',
  1933. },
  1934. ],
  1935. },
  1936. state: 'via',
  1937. preferences: {
  1938. permission: ['admin.channel_email'],
  1939. },
  1940. frontend: false
  1941. )
  1942. Setting.create_if_not_exists(
  1943. title: 'Maximum Email Size',
  1944. name: 'postmaster_max_size',
  1945. area: 'Email::Base',
  1946. description: 'Maximum size in MB of emails.',
  1947. options: {
  1948. form: [
  1949. {
  1950. display: '',
  1951. null: true,
  1952. name: 'postmaster_max_size',
  1953. tag: 'select',
  1954. options: {
  1955. 1 => ' 1',
  1956. 2 => ' 2',
  1957. 3 => ' 3',
  1958. 4 => ' 4',
  1959. 5 => ' 5',
  1960. 6 => ' 6',
  1961. 7 => ' 7',
  1962. 8 => ' 8',
  1963. 9 => ' 9',
  1964. 10 => ' 10',
  1965. 15 => ' 15',
  1966. 20 => ' 20',
  1967. 25 => ' 25',
  1968. 30 => ' 30',
  1969. 35 => ' 35',
  1970. 40 => ' 40',
  1971. 45 => ' 45',
  1972. 50 => ' 50',
  1973. 60 => ' 60',
  1974. 70 => ' 70',
  1975. 80 => ' 80',
  1976. 90 => ' 90',
  1977. 100 => '100',
  1978. 125 => '125',
  1979. 150 => '150',
  1980. },
  1981. },
  1982. ],
  1983. },
  1984. state: 10,
  1985. preferences: {
  1986. online_service_disable: true,
  1987. permission: ['admin.channel_email'],
  1988. },
  1989. frontend: false
  1990. )
  1991. Setting.create_if_not_exists(
  1992. title: 'Additional follow-up detection',
  1993. name: 'postmaster_follow_up_search_in',
  1994. area: 'Email::Base',
  1995. description: 'By default the follow-up check is done via the subject of an email. With this setting you can add more fields for which the follow-up check will be executed.',
  1996. options: {
  1997. form: [
  1998. {
  1999. display: '',
  2000. null: true,
  2001. name: 'postmaster_follow_up_search_in',
  2002. tag: 'checkbox',
  2003. options: {
  2004. 'references' => 'References - Search for follow up also in In-Reply-To or References headers.',
  2005. 'body' => 'Body - Search for follow up also in mail body.',
  2006. 'attachment' => 'Attachment - Search for follow up also in attachments.',
  2007. },
  2008. },
  2009. ],
  2010. },
  2011. state: [],
  2012. preferences: {
  2013. permission: ['admin.channel_email'],
  2014. },
  2015. frontend: false
  2016. )
  2017. Setting.create_if_not_exists(
  2018. title: 'Sender based on Reply-To header',
  2019. name: 'postmaster_sender_based_on_reply_to',
  2020. area: 'Email::Base',
  2021. description: 'Set/overwrite sender/from of email based on reply-to header. Useful to set correct customer if email is received from a third party system on behalf of a customer.',
  2022. options: {
  2023. form: [
  2024. {
  2025. display: '',
  2026. null: true,
  2027. name: 'postmaster_sender_based_on_reply_to',
  2028. tag: 'select',
  2029. options: {
  2030. '' => '-',
  2031. 'as_sender_of_email' => 'Take reply-to header as sender/from of email.',
  2032. 'as_sender_of_email_use_from_realname' => 'Take reply-to header as sender/from of email and use realname of origin from.',
  2033. },
  2034. },
  2035. ],
  2036. },
  2037. state: [],
  2038. preferences: {
  2039. permission: ['admin.channel_email'],
  2040. },
  2041. frontend: false
  2042. )
  2043. Setting.create_if_not_exists(
  2044. title: 'Customer selection based on sender and receiver list',
  2045. name: 'postmaster_sender_is_agent_search_for_customer',
  2046. area: 'Email::Base',
  2047. description: 'If the sender is an agent, set the first user in the recipient list as a customer.',
  2048. options: {
  2049. form: [
  2050. {
  2051. display: '',
  2052. null: true,
  2053. name: 'postmaster_sender_is_agent_search_for_customer',
  2054. tag: 'boolean',
  2055. options: {
  2056. true => 'yes',
  2057. false => 'no',
  2058. },
  2059. },
  2060. ],
  2061. },
  2062. state: true,
  2063. preferences: {
  2064. permission: ['admin.channel_email'],
  2065. },
  2066. frontend: false
  2067. )
  2068. Setting.create_if_not_exists(
  2069. title: 'Notification Sender',
  2070. name: 'notification_sender',
  2071. area: 'Email::Base',
  2072. description: 'Defines the sender of email notifications.',
  2073. options: {
  2074. form: [
  2075. {
  2076. display: '',
  2077. null: false,
  2078. name: 'notification_sender',
  2079. tag: 'input',
  2080. },
  2081. ],
  2082. },
  2083. state: 'Notification Master <noreply@#{config.fqdn}>', # rubocop:disable Lint/InterpolationCheck
  2084. preferences: {
  2085. online_service_disable: true,
  2086. permission: ['admin.channel_email'],
  2087. },
  2088. frontend: false
  2089. )
  2090. Setting.create_if_not_exists(
  2091. title: 'Block Notifications',
  2092. name: 'send_no_auto_response_reg_exp',
  2093. area: 'Email::Base',
  2094. description: 'If this regex matches, no notification will be sent by the sender.',
  2095. options: {
  2096. form: [
  2097. {
  2098. display: '',
  2099. null: false,
  2100. name: 'send_no_auto_response_reg_exp',
  2101. tag: 'input',
  2102. },
  2103. ],
  2104. },
  2105. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?',
  2106. preferences: {
  2107. online_service_disable: true,
  2108. permission: ['admin.channel_email'],
  2109. },
  2110. frontend: false
  2111. )
  2112. Setting.create_if_not_exists(
  2113. title: 'API Token Access',
  2114. name: 'api_token_access',
  2115. area: 'API::Base',
  2116. description: 'Enable REST API using tokens (not username/email address and password). Each user needs to create its own access tokens in user profile.',
  2117. options: {
  2118. form: [
  2119. {
  2120. display: '',
  2121. null: true,
  2122. name: 'api_token_access',
  2123. tag: 'boolean',
  2124. options: {
  2125. true => 'yes',
  2126. false => 'no',
  2127. },
  2128. },
  2129. ],
  2130. },
  2131. state: true,
  2132. preferences: {
  2133. permission: ['admin.api'],
  2134. },
  2135. frontend: false
  2136. )
  2137. Setting.create_if_not_exists(
  2138. title: 'API Password Access',
  2139. name: 'api_password_access',
  2140. area: 'API::Base',
  2141. description: 'Enable REST API access using the username/email address and password for the authentication user.',
  2142. options: {
  2143. form: [
  2144. {
  2145. display: '',
  2146. null: true,
  2147. name: 'api_password_access',
  2148. tag: 'boolean',
  2149. options: {
  2150. true => 'yes',
  2151. false => 'no',
  2152. },
  2153. },
  2154. ],
  2155. },
  2156. state: true,
  2157. preferences: {
  2158. permission: ['admin.api'],
  2159. },
  2160. frontend: false
  2161. )
  2162. Setting.create_if_not_exists(
  2163. title: 'Monitoring Token',
  2164. name: 'monitoring_token',
  2165. area: 'HealthCheck::Base',
  2166. description: 'Token for monitoring.',
  2167. options: {
  2168. form: [
  2169. {
  2170. display: '',
  2171. null: false,
  2172. name: 'monitoring_token',
  2173. tag: 'input',
  2174. },
  2175. ],
  2176. },
  2177. state: SecureRandom.urlsafe_base64(40),
  2178. preferences: {
  2179. permission: ['admin.monitoring'],
  2180. },
  2181. frontend: false
  2182. )
  2183. Setting.create_if_not_exists(
  2184. title: 'Enable Chat',
  2185. name: 'chat',
  2186. area: 'Chat::Base',
  2187. description: 'Enable/disable online chat.',
  2188. options: {
  2189. form: [
  2190. {
  2191. display: '',
  2192. null: true,
  2193. name: 'chat',
  2194. tag: 'boolean',
  2195. options: {
  2196. true => 'yes',
  2197. false => 'no',
  2198. },
  2199. },
  2200. ],
  2201. },
  2202. preferences: {
  2203. trigger: ['menu:render', 'chat:rerender'],
  2204. permission: ['admin.channel_chat'],
  2205. },
  2206. state: false,
  2207. frontend: true
  2208. )
  2209. Setting.create_if_not_exists(
  2210. title: 'Agent idle timeout',
  2211. name: 'chat_agent_idle_timeout',
  2212. area: 'Chat::Extended',
  2213. description: 'Idle timeout in seconds until agent is set offline automatically.',
  2214. options: {
  2215. form: [
  2216. {
  2217. display: '',
  2218. null: false,
  2219. name: 'chat_agent_idle_timeout',
  2220. tag: 'input',
  2221. },
  2222. ],
  2223. },
  2224. state: '120',
  2225. preferences: {
  2226. permission: ['admin.channel_chat'],
  2227. },
  2228. frontend: true
  2229. )
  2230. Setting.create_if_not_exists(
  2231. title: 'Defines searchable models.',
  2232. name: 'models_searchable',
  2233. area: 'Models::Base',
  2234. description: 'Defines the searchable models.',
  2235. options: {},
  2236. state: [],
  2237. preferences: {
  2238. authentication: true,
  2239. },
  2240. frontend: true,
  2241. )
  2242. Setting.create_if_not_exists(
  2243. title: 'Default Screen',
  2244. name: 'default_controller',
  2245. area: 'Core',
  2246. description: 'Defines the default screen.',
  2247. options: {},
  2248. state: '#dashboard',
  2249. frontend: true
  2250. )
  2251. Setting.create_if_not_exists(
  2252. title: 'Elasticsearch Endpoint URL',
  2253. name: 'es_url',
  2254. area: 'SearchIndex::Elasticsearch',
  2255. description: 'Defines endpoint of Elasticsearch.',
  2256. state: '',
  2257. preferences: { online_service_disable: true },
  2258. frontend: false
  2259. )
  2260. Setting.create_if_not_exists(
  2261. title: 'Elasticsearch Endpoint User',
  2262. name: 'es_user',
  2263. area: 'SearchIndex::Elasticsearch',
  2264. description: 'Defines HTTP basic auth user of Elasticsearch.',
  2265. state: '',
  2266. preferences: { online_service_disable: true },
  2267. frontend: false
  2268. )
  2269. Setting.create_if_not_exists(
  2270. title: 'Elasticsearch Endpoint Password',
  2271. name: 'es_password',
  2272. area: 'SearchIndex::Elasticsearch',
  2273. description: 'Defines HTTP basic auth password of Elasticsearch.',
  2274. state: '',
  2275. preferences: { online_service_disable: true },
  2276. frontend: false
  2277. )
  2278. Setting.create_if_not_exists(
  2279. title: 'Elasticsearch Endpoint Index',
  2280. name: 'es_index',
  2281. area: 'SearchIndex::Elasticsearch',
  2282. description: 'Defines Elasticsearch index name.',
  2283. state: 'zammad',
  2284. preferences: { online_service_disable: true },
  2285. frontend: false
  2286. )
  2287. Setting.create_if_not_exists(
  2288. title: 'Elasticsearch Attachment Extensions',
  2289. name: 'es_attachment_ignore',
  2290. area: 'SearchIndex::Elasticsearch',
  2291. description: 'Defines attachment extensions which will be ignored by Elasticsearch.',
  2292. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  2293. preferences: { online_service_disable: true },
  2294. frontend: false
  2295. )
  2296. Setting.create_if_not_exists(
  2297. title: 'Elasticsearch Attachment Size',
  2298. name: 'es_attachment_max_size_in_mb',
  2299. area: 'SearchIndex::Elasticsearch',
  2300. description: 'Define max. attachment size for Elasticsearch.',
  2301. state: 50,
  2302. preferences: { online_service_disable: true },
  2303. frontend: false
  2304. )
  2305. Setting.create_if_not_exists(
  2306. title: 'Elasticsearch Pipeline Name',
  2307. name: 'es_pipeline',
  2308. area: 'SearchIndex::Elasticsearch',
  2309. description: 'Define pipeline name for Elasticsearch.',
  2310. state: '',
  2311. preferences: { online_service_disable: true },
  2312. frontend: false
  2313. )
  2314. Setting.create_if_not_exists(
  2315. title: 'Import Mode',
  2316. name: 'import_mode',
  2317. area: 'Import::Base',
  2318. description: 'Puts Zammad into import mode (disables some triggers).',
  2319. options: {
  2320. form: [
  2321. {
  2322. display: '',
  2323. null: true,
  2324. name: 'import_mode',
  2325. tag: 'boolean',
  2326. options: {
  2327. true => 'yes',
  2328. false => 'no',
  2329. },
  2330. },
  2331. ],
  2332. },
  2333. state: false,
  2334. frontend: true
  2335. )
  2336. Setting.create_if_not_exists(
  2337. title: 'Import Backend',
  2338. name: 'import_backend',
  2339. area: 'Import::Base::Internal',
  2340. description: 'Set backend which is being used for import.',
  2341. options: {},
  2342. state: '',
  2343. frontend: true
  2344. )
  2345. Setting.create_if_not_exists(
  2346. title: 'Ignore Escalation/SLA Information',
  2347. name: 'import_ignore_sla',
  2348. area: 'Import::Base',
  2349. description: 'Ignore escalation/SLA information for import.',
  2350. options: {
  2351. form: [
  2352. {
  2353. display: '',
  2354. null: true,
  2355. name: 'import_ignore_sla',
  2356. tag: 'boolean',
  2357. options: {
  2358. true => 'yes',
  2359. false => 'no',
  2360. },
  2361. },
  2362. ],
  2363. },
  2364. state: false,
  2365. frontend: false
  2366. )
  2367. Setting.create_if_not_exists(
  2368. title: 'Import Endpoint',
  2369. name: 'import_otrs_endpoint',
  2370. area: 'Import::OTRS',
  2371. description: 'Defines OTRS endpoint to import users, tickets, states and articles.',
  2372. options: {
  2373. form: [
  2374. {
  2375. display: '',
  2376. null: false,
  2377. name: 'import_otrs_endpoint',
  2378. tag: 'input',
  2379. },
  2380. ],
  2381. },
  2382. state: 'http://otrs_host/otrs',
  2383. frontend: false
  2384. )
  2385. Setting.create_if_not_exists(
  2386. title: 'Import Key',
  2387. name: 'import_otrs_endpoint_key',
  2388. area: 'Import::OTRS',
  2389. description: 'Defines OTRS endpoint authentication key.',
  2390. options: {
  2391. form: [
  2392. {
  2393. display: '',
  2394. null: false,
  2395. name: 'import_otrs_endpoint_key',
  2396. tag: 'input',
  2397. },
  2398. ],
  2399. },
  2400. state: '',
  2401. frontend: false
  2402. )
  2403. Setting.create_if_not_exists(
  2404. title: 'Import User for HTTP basic authentication',
  2405. name: 'import_otrs_user',
  2406. area: 'Import::OTRS',
  2407. description: 'Defines HTTP basic authentication user (only if OTRS is protected via HTTP basic auth).',
  2408. options: {
  2409. form: [
  2410. {
  2411. display: '',
  2412. null: true,
  2413. name: 'import_otrs_user',
  2414. tag: 'input',
  2415. },
  2416. ],
  2417. },
  2418. state: '',
  2419. frontend: false
  2420. )
  2421. Setting.create_if_not_exists(
  2422. title: 'Import Password for http basic authentication',
  2423. name: 'import_otrs_password',
  2424. area: 'Import::OTRS',
  2425. description: 'Defines http basic authentication password (only if OTRS is protected via http basic auth).',
  2426. options: {
  2427. form: [
  2428. {
  2429. display: '',
  2430. null: true,
  2431. name: 'import_otrs_password',
  2432. tag: 'input',
  2433. },
  2434. ],
  2435. },
  2436. state: '',
  2437. frontend: false
  2438. )
  2439. Setting.create_if_not_exists(
  2440. title: 'Import Endpoint',
  2441. name: 'import_zendesk_endpoint',
  2442. area: 'Import::Zendesk',
  2443. description: 'Defines Zendesk endpoint to import users, ticket, states and articles.',
  2444. options: {
  2445. form: [
  2446. {
  2447. display: '',
  2448. null: false,
  2449. name: 'import_zendesk_endpoint',
  2450. tag: 'input',
  2451. },
  2452. ],
  2453. },
  2454. state: 'https://yours.zendesk.com/api/v2',
  2455. frontend: false
  2456. )
  2457. Setting.create_if_not_exists(
  2458. title: 'Import Key for requesting the Zendesk API',
  2459. name: 'import_zendesk_endpoint_key',
  2460. area: 'Import::Zendesk',
  2461. description: 'Defines Zendesk endpoint authentication key.',
  2462. options: {
  2463. form: [
  2464. {
  2465. display: '',
  2466. null: false,
  2467. name: 'import_zendesk_endpoint_key',
  2468. tag: 'input',
  2469. },
  2470. ],
  2471. },
  2472. state: '',
  2473. frontend: false
  2474. )
  2475. Setting.create_if_not_exists(
  2476. title: 'Import User for requesting the Zendesk API',
  2477. name: 'import_zendesk_endpoint_username',
  2478. area: 'Import::Zendesk',
  2479. description: 'Defines Zendesk endpoint authentication user.',
  2480. options: {
  2481. form: [
  2482. {
  2483. display: '',
  2484. null: true,
  2485. name: 'import_zendesk_endpoint_username',
  2486. tag: 'input',
  2487. },
  2488. ],
  2489. },
  2490. state: '',
  2491. frontend: false
  2492. )
  2493. Setting.create_if_not_exists(
  2494. title: 'Import Backends',
  2495. name: 'import_backends',
  2496. area: 'Import',
  2497. description: 'A list of active import backends that get scheduled automatically.',
  2498. options: {},
  2499. state: ['Import::Ldap', 'Import::Exchange'],
  2500. preferences: {
  2501. permission: ['admin'],
  2502. },
  2503. frontend: false
  2504. )
  2505. Setting.create_if_not_exists(
  2506. title: 'Time Accounting',
  2507. name: 'time_accounting',
  2508. area: 'Web::Base',
  2509. description: 'Enable time accounting.',
  2510. options: {
  2511. form: [
  2512. {
  2513. display: '',
  2514. null: true,
  2515. name: 'time_accounting',
  2516. tag: 'boolean',
  2517. options: {
  2518. true => 'yes',
  2519. false => 'no',
  2520. },
  2521. },
  2522. ],
  2523. },
  2524. preferences: {
  2525. authentication: true,
  2526. permission: ['admin.time_accounting'],
  2527. },
  2528. state: false,
  2529. frontend: true
  2530. )
  2531. Setting.create_if_not_exists(
  2532. title: 'Time Accounting Selector',
  2533. name: 'time_accounting_selector',
  2534. area: 'Web::Base',
  2535. description: 'Enable time accounting for these tickets.',
  2536. options: {
  2537. form: [
  2538. {},
  2539. ],
  2540. },
  2541. preferences: {
  2542. authentication: true,
  2543. permission: ['admin.time_accounting'],
  2544. },
  2545. state: {},
  2546. frontend: true
  2547. )
  2548. Setting.create_if_not_exists(
  2549. title: 'New Tags',
  2550. name: 'tag_new',
  2551. area: 'Web::Base',
  2552. description: 'Allow users to create new tags.',
  2553. options: {
  2554. form: [
  2555. {
  2556. display: '',
  2557. null: true,
  2558. name: 'tag_new',
  2559. tag: 'boolean',
  2560. options: {
  2561. true => 'yes',
  2562. false => 'no',
  2563. },
  2564. },
  2565. ],
  2566. },
  2567. preferences: {
  2568. authentication: true,
  2569. permission: ['admin.tag'],
  2570. },
  2571. state: true,
  2572. frontend: true
  2573. )
  2574. Setting.create_if_not_exists(
  2575. title: 'Default calendar tickets subscriptions',
  2576. name: 'defaults_calendar_subscriptions_tickets',
  2577. area: 'Defaults::CalendarSubscriptions',
  2578. description: 'Defines the default calendar tickets subscription settings.',
  2579. options: {},
  2580. state: {
  2581. escalation: {
  2582. own: true,
  2583. not_assigned: false,
  2584. },
  2585. new_open: {
  2586. own: true,
  2587. not_assigned: false,
  2588. },
  2589. pending: {
  2590. own: true,
  2591. not_assigned: false,
  2592. }
  2593. },
  2594. preferences: {
  2595. authentication: true,
  2596. },
  2597. frontend: true
  2598. )
  2599. Setting.create_if_not_exists(
  2600. title: 'Defines translator identifier.',
  2601. name: 'translator_key',
  2602. area: 'i18n::translator_key',
  2603. description: 'Defines the translator identifier for contributions.',
  2604. options: {},
  2605. state: '',
  2606. frontend: false
  2607. )
  2608. Setting.create_if_not_exists(
  2609. title: 'Defines postmaster filter.',
  2610. name: '0010_postmaster_filter_trusted',
  2611. area: 'Postmaster::PreFilter',
  2612. description: 'Defines postmaster filter to remove X-Zammad headers from not trusted sources.',
  2613. options: {},
  2614. state: 'Channel::Filter::Trusted',
  2615. frontend: false
  2616. )
  2617. Setting.create_if_not_exists(
  2618. title: 'Defines postmaster filter.',
  2619. name: '0011_postmaster_sender_based_on_reply_to',
  2620. area: 'Postmaster::PreFilter',
  2621. description: 'Defines postmaster filter to set the sender/from of emails based on reply-to header.',
  2622. options: {},
  2623. state: 'Channel::Filter::ReplyToBasedSender',
  2624. frontend: false
  2625. )
  2626. Setting.create_if_not_exists(
  2627. title: 'Defines postmaster filter.',
  2628. name: '0012_postmaster_filter_sender_is_system_address',
  2629. area: 'Postmaster::PreFilter',
  2630. description: 'Defines postmaster filter to check if email has been created by Zammad itself and will set the article sender.',
  2631. options: {},
  2632. state: 'Channel::Filter::SenderIsSystemAddress',
  2633. frontend: false
  2634. )
  2635. Setting.create_if_not_exists(
  2636. title: 'Defines postmaster filter.',
  2637. name: '0014_postmaster_filter_own_notification_loop_detection',
  2638. area: 'Postmaster::PreFilter',
  2639. description: 'Define postmaster filter to check if email is a own created notification email, then ignore it to prevent email loops.',
  2640. options: {},
  2641. state: 'Channel::Filter::OwnNotificationLoopDetection',
  2642. frontend: false
  2643. )
  2644. Setting.create_if_not_exists(
  2645. title: 'Defines postmaster filter.',
  2646. name: '0015_postmaster_filter_identify_sender',
  2647. area: 'Postmaster::PreFilter',
  2648. description: 'Defines postmaster filter to identify sender user.',
  2649. options: {},
  2650. state: 'Channel::Filter::IdentifySender',
  2651. frontend: false
  2652. )
  2653. Setting.create_if_not_exists(
  2654. title: 'Defines postmaster filter.',
  2655. name: '0020_postmaster_filter_auto_response_check',
  2656. area: 'Postmaster::PreFilter',
  2657. description: 'Defines postmaster filter to identify auto responses to prevent auto replies from Zammad.',
  2658. options: {},
  2659. state: 'Channel::Filter::AutoResponseCheck',
  2660. frontend: false
  2661. )
  2662. Setting.create_if_not_exists(
  2663. title: 'Defines postmaster filter.',
  2664. name: '0030_postmaster_filter_out_of_office_check',
  2665. area: 'Postmaster::PreFilter',
  2666. description: 'Defines postmaster filter to identify out-of-office emails for follow-up detection and keeping current ticket state.',
  2667. options: {},
  2668. state: 'Channel::Filter::OutOfOfficeCheck',
  2669. frontend: false
  2670. )
  2671. Setting.create_if_not_exists(
  2672. title: 'Defines postmaster filter.',
  2673. name: '0100_postmaster_filter_follow_up_check',
  2674. area: 'Postmaster::PreFilter',
  2675. description: 'Defines postmaster filter to identify follow-ups (based on admin settings).',
  2676. options: {},
  2677. state: 'Channel::Filter::FollowUpCheck',
  2678. frontend: false
  2679. )
  2680. Setting.create_if_not_exists(
  2681. title: 'Defines postmaster filter.',
  2682. name: '0110_postmaster_filter_follow_up_merged',
  2683. area: 'Postmaster::PreFilter',
  2684. description: 'Defines postmaster filter to identify follow-up ticket for merged tickets.',
  2685. options: {},
  2686. state: 'Channel::Filter::FollowUpMerged',
  2687. frontend: false
  2688. )
  2689. Setting.create_if_not_exists(
  2690. title: 'Defines postmaster filter.',
  2691. name: '0200_postmaster_filter_follow_up_possible_check',
  2692. area: 'Postmaster::PreFilter',
  2693. description: 'Define postmaster filter to check if follow ups get created (based on admin settings).',
  2694. options: {},
  2695. state: 'Channel::Filter::FollowUpPossibleCheck',
  2696. frontend: false
  2697. )
  2698. Setting.create_if_not_exists(
  2699. title: 'Defines postmaster filter.',
  2700. name: '0900_postmaster_filter_bounce_follow_up_check',
  2701. area: 'Postmaster::PreFilter',
  2702. description: 'Defines postmaster filter to identify postmaster bounced - to handle it as follow-up of the original ticket.',
  2703. options: {},
  2704. state: 'Channel::Filter::BounceFollowUpCheck',
  2705. frontend: false
  2706. )
  2707. Setting.create_if_not_exists(
  2708. title: 'Defines postmaster filter.',
  2709. name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
  2710. area: 'Postmaster::PreFilter',
  2711. description: 'Defines postmaster filter to identify postmaster bounced - disable sending notification on permanent deleivery failed.',
  2712. options: {},
  2713. state: 'Channel::Filter::BounceDeliveryPermanentFailed',
  2714. frontend: false
  2715. )
  2716. Setting.create_if_not_exists(
  2717. title: 'Defines postmaster filter.',
  2718. name: '1000_postmaster_filter_database_check',
  2719. area: 'Postmaster::PreFilter',
  2720. description: 'Defines postmaster filter for filters managed via admin interface.',
  2721. options: {},
  2722. state: 'Channel::Filter::Database',
  2723. frontend: false
  2724. )
  2725. Setting.create_if_not_exists(
  2726. title: 'Defines postmaster filter.',
  2727. name: '5000_postmaster_filter_icinga',
  2728. area: 'Postmaster::PreFilter',
  2729. description: 'Defines postmaster filter to manage Icinga (http://www.icinga.org) emails.',
  2730. options: {},
  2731. state: 'Channel::Filter::Icinga',
  2732. frontend: false
  2733. )
  2734. Setting.create_if_not_exists(
  2735. title: 'Defines postmaster filter.',
  2736. name: '5100_postmaster_filter_nagios',
  2737. area: 'Postmaster::PreFilter',
  2738. description: 'Defines postmaster filter to manage Nagios (http://www.nagios.org) emails.',
  2739. options: {},
  2740. state: 'Channel::Filter::Nagios',
  2741. frontend: false
  2742. )
  2743. Setting.create_if_not_exists(
  2744. title: 'Defines postmaster filter.',
  2745. name: '5300_postmaster_filter_monit',
  2746. area: 'Postmaster::PreFilter',
  2747. description: 'Defines postmaster filter to manage Monit (https://mmonit.com/monit/) emails.',
  2748. options: {},
  2749. state: 'Channel::Filter::Monit',
  2750. frontend: false
  2751. )
  2752. Setting.create_if_not_exists(
  2753. title: 'Icinga integration',
  2754. name: 'icinga_integration',
  2755. area: 'Integration::Switch',
  2756. description: 'Defines if Icinga (http://www.icinga.org) is enabled or not.',
  2757. options: {
  2758. form: [
  2759. {
  2760. display: '',
  2761. null: true,
  2762. name: 'icinga_integration',
  2763. tag: 'boolean',
  2764. options: {
  2765. true => 'yes',
  2766. false => 'no',
  2767. },
  2768. },
  2769. ],
  2770. },
  2771. state: false,
  2772. preferences: {
  2773. prio: 1,
  2774. permission: ['admin.integration'],
  2775. },
  2776. frontend: false
  2777. )
  2778. Setting.create_if_not_exists(
  2779. title: 'Sender',
  2780. name: 'icinga_sender',
  2781. area: 'Integration::Icinga',
  2782. description: 'Defines the sender email address of Icinga emails.',
  2783. options: {
  2784. form: [
  2785. {
  2786. display: '',
  2787. null: false,
  2788. name: 'icinga_sender',
  2789. tag: 'input',
  2790. placeholder: 'icinga@monitoring.example.com',
  2791. },
  2792. ],
  2793. },
  2794. state: 'icinga@monitoring.example.com',
  2795. preferences: {
  2796. prio: 2,
  2797. permission: ['admin.integration'],
  2798. },
  2799. frontend: false,
  2800. )
  2801. Setting.create_if_not_exists(
  2802. title: 'Auto close',
  2803. name: 'icinga_auto_close',
  2804. area: 'Integration::Icinga',
  2805. description: 'Defines if tickets should be closed if service is recovered.',
  2806. options: {
  2807. form: [
  2808. {
  2809. display: '',
  2810. null: true,
  2811. name: 'icinga_auto_close',
  2812. tag: 'boolean',
  2813. options: {
  2814. true => 'yes',
  2815. false => 'no',
  2816. },
  2817. },
  2818. ],
  2819. },
  2820. state: true,
  2821. preferences: {
  2822. prio: 3,
  2823. permission: ['admin.integration'],
  2824. },
  2825. frontend: false
  2826. )
  2827. Setting.create_if_not_exists(
  2828. title: 'Auto close state',
  2829. name: 'icinga_auto_close_state_id',
  2830. area: 'Integration::Icinga',
  2831. description: 'Defines the state of auto closed tickets.',
  2832. options: {
  2833. form: [
  2834. {
  2835. display: '',
  2836. null: false,
  2837. name: 'icinga_auto_close_state_id',
  2838. tag: 'select',
  2839. relation: 'TicketState',
  2840. },
  2841. ],
  2842. },
  2843. state: 4,
  2844. preferences: {
  2845. prio: 4,
  2846. permission: ['admin.integration'],
  2847. },
  2848. frontend: false
  2849. )
  2850. Setting.create_if_not_exists(
  2851. title: 'Nagios integration',
  2852. name: 'nagios_integration',
  2853. area: 'Integration::Switch',
  2854. description: 'Defines if Nagios (http://www.nagios.org) is enabled or not.',
  2855. options: {
  2856. form: [
  2857. {
  2858. display: '',
  2859. null: true,
  2860. name: 'nagios_integration',
  2861. tag: 'boolean',
  2862. options: {
  2863. true => 'yes',
  2864. false => 'no',
  2865. },
  2866. },
  2867. ],
  2868. },
  2869. state: false,
  2870. preferences: {
  2871. prio: 1,
  2872. permission: ['admin.integration'],
  2873. },
  2874. frontend: false
  2875. )
  2876. Setting.create_if_not_exists(
  2877. title: 'Sender',
  2878. name: 'nagios_sender',
  2879. area: 'Integration::Nagios',
  2880. description: 'Defines the sender email address of Nagios emails.',
  2881. options: {
  2882. form: [
  2883. {
  2884. display: '',
  2885. null: false,
  2886. name: 'nagios_sender',
  2887. tag: 'input',
  2888. placeholder: 'nagios@monitoring.example.com',
  2889. },
  2890. ],
  2891. },
  2892. state: 'nagios@monitoring.example.com',
  2893. preferences: {
  2894. prio: 2,
  2895. permission: ['admin.integration'],
  2896. },
  2897. frontend: false,
  2898. )
  2899. Setting.create_if_not_exists(
  2900. title: 'Auto close',
  2901. name: 'nagios_auto_close',
  2902. area: 'Integration::Nagios',
  2903. description: 'Defines if tickets should be closed if service is recovered.',
  2904. options: {
  2905. form: [
  2906. {
  2907. display: '',
  2908. null: true,
  2909. name: 'nagios_auto_close',
  2910. tag: 'boolean',
  2911. options: {
  2912. true => 'yes',
  2913. false => 'no',
  2914. },
  2915. },
  2916. ],
  2917. },
  2918. state: true,
  2919. preferences: {
  2920. prio: 3,
  2921. permission: ['admin.integration'],
  2922. },
  2923. frontend: false
  2924. )
  2925. Setting.create_if_not_exists(
  2926. title: 'Auto close state',
  2927. name: 'nagios_auto_close_state_id',
  2928. area: 'Integration::Nagios',
  2929. description: 'Defines the state of auto closed tickets.',
  2930. options: {
  2931. form: [
  2932. {
  2933. display: '',
  2934. null: false,
  2935. name: 'nagios_auto_close_state_id',
  2936. tag: 'select',
  2937. relation: 'TicketState',
  2938. },
  2939. ],
  2940. },
  2941. state: 4,
  2942. preferences: {
  2943. prio: 4,
  2944. permission: ['admin.integration'],
  2945. },
  2946. frontend: false
  2947. )
  2948. Setting.create_if_not_exists(
  2949. title: 'Check_MK integration',
  2950. name: 'check_mk_integration',
  2951. area: 'Integration::Switch',
  2952. description: 'Defines if Check_MK (http://mathias-kettner.com/check_mk.html) is enabled or not.',
  2953. options: {
  2954. form: [
  2955. {
  2956. display: '',
  2957. null: true,
  2958. name: 'check_mk_integration',
  2959. tag: 'boolean',
  2960. options: {
  2961. true => 'yes',
  2962. false => 'no',
  2963. },
  2964. },
  2965. ],
  2966. },
  2967. state: false,
  2968. preferences: {
  2969. prio: 1,
  2970. permission: ['admin.integration'],
  2971. },
  2972. frontend: false
  2973. )
  2974. Setting.create_if_not_exists(
  2975. title: 'Group',
  2976. name: 'check_mk_group_id',
  2977. area: 'Integration::CheckMK',
  2978. description: 'Defines the group of created tickets.',
  2979. options: {
  2980. form: [
  2981. {
  2982. display: '',
  2983. null: false,
  2984. name: 'check_mk_group_id',
  2985. tag: 'select',
  2986. relation: 'Group',
  2987. },
  2988. ],
  2989. },
  2990. state: 1,
  2991. preferences: {
  2992. prio: 2,
  2993. permission: ['admin.integration'],
  2994. },
  2995. frontend: false
  2996. )
  2997. Setting.create_if_not_exists(
  2998. title: 'Auto close',
  2999. name: 'check_mk_auto_close',
  3000. area: 'Integration::CheckMK',
  3001. description: 'Defines if tickets should be closed if service is recovered.',
  3002. options: {
  3003. form: [
  3004. {
  3005. display: '',
  3006. null: true,
  3007. name: 'check_mk_auto_close',
  3008. tag: 'boolean',
  3009. options: {
  3010. true => 'yes',
  3011. false => 'no',
  3012. },
  3013. },
  3014. ],
  3015. },
  3016. state: true,
  3017. preferences: {
  3018. prio: 3,
  3019. permission: ['admin.integration'],
  3020. },
  3021. frontend: false
  3022. )
  3023. Setting.create_if_not_exists(
  3024. title: 'Auto close state',
  3025. name: 'check_mk_auto_close_state_id',
  3026. area: 'Integration::CheckMK',
  3027. description: 'Defines the state of auto closed tickets.',
  3028. options: {
  3029. form: [
  3030. {
  3031. display: '',
  3032. null: false,
  3033. name: 'check_mk_auto_close_state_id',
  3034. tag: 'select',
  3035. relation: 'TicketState',
  3036. },
  3037. ],
  3038. },
  3039. state: 4,
  3040. preferences: {
  3041. prio: 4,
  3042. permission: ['admin.integration'],
  3043. },
  3044. frontend: false
  3045. )
  3046. Setting.create_if_not_exists(
  3047. title: 'Check_MK tolen',
  3048. name: 'check_mk_token',
  3049. area: 'Core',
  3050. description: 'Defines the Check_MK token for allowing updates.',
  3051. options: {},
  3052. state: SecureRandom.hex(16),
  3053. preferences: {
  3054. permission: ['admin.integration'],
  3055. },
  3056. frontend: false
  3057. )
  3058. Setting.create_if_not_exists(
  3059. title: 'Monit integration',
  3060. name: 'monit_integration',
  3061. area: 'Integration::Switch',
  3062. description: 'Defines if Monit (https://mmonit.com/monit/) is enabled or not.',
  3063. options: {
  3064. form: [
  3065. {
  3066. display: '',
  3067. null: true,
  3068. name: 'monit_integration',
  3069. tag: 'boolean',
  3070. options: {
  3071. true => 'yes',
  3072. false => 'no',
  3073. },
  3074. },
  3075. ],
  3076. },
  3077. state: false,
  3078. preferences: {
  3079. prio: 1,
  3080. permission: ['admin.integration'],
  3081. },
  3082. frontend: false
  3083. )
  3084. Setting.create_if_not_exists(
  3085. title: 'Sender',
  3086. name: 'monit_sender',
  3087. area: 'Integration::Monit',
  3088. description: 'Defines the sender email address of the service emails.',
  3089. options: {
  3090. form: [
  3091. {
  3092. display: '',
  3093. null: false,
  3094. name: 'monit_sender',
  3095. tag: 'input',
  3096. placeholder: 'monit@monitoring.example.com',
  3097. },
  3098. ],
  3099. },
  3100. state: 'monit@monitoring.example.com',
  3101. preferences: {
  3102. prio: 2,
  3103. permission: ['admin.integration'],
  3104. },
  3105. frontend: false,
  3106. )
  3107. Setting.create_if_not_exists(
  3108. title: 'Auto close',
  3109. name: 'monit_auto_close',
  3110. area: 'Integration::Monit',
  3111. description: 'Defines if tickets should be closed if service is recovered.',
  3112. options: {
  3113. form: [
  3114. {
  3115. display: '',
  3116. null: true,
  3117. name: 'monit_auto_close',
  3118. tag: 'boolean',
  3119. options: {
  3120. true => 'yes',
  3121. false => 'no',
  3122. },
  3123. translate: true,
  3124. },
  3125. ],
  3126. },
  3127. state: true,
  3128. preferences: {
  3129. prio: 3,
  3130. permission: ['admin.integration'],
  3131. },
  3132. frontend: false
  3133. )
  3134. Setting.create_if_not_exists(
  3135. title: 'Auto close state',
  3136. name: 'monit_auto_close_state_id',
  3137. area: 'Integration::Monit',
  3138. description: 'Defines the state of auto closed tickets.',
  3139. options: {
  3140. form: [
  3141. {
  3142. display: '',
  3143. null: false,
  3144. name: 'monit_auto_close_state_id',
  3145. tag: 'select',
  3146. relation: 'TicketState',
  3147. translate: true,
  3148. },
  3149. ],
  3150. },
  3151. state: 4,
  3152. preferences: {
  3153. prio: 4,
  3154. permission: ['admin.integration'],
  3155. },
  3156. frontend: false
  3157. )
  3158. Setting.create_if_not_exists(
  3159. title: 'LDAP integration',
  3160. name: 'ldap_integration',
  3161. area: 'Integration::Switch',
  3162. description: 'Defines if LDAP is enabled or not.',
  3163. options: {
  3164. form: [
  3165. {
  3166. display: '',
  3167. null: true,
  3168. name: 'ldap_integration',
  3169. tag: 'boolean',
  3170. options: {
  3171. true => 'yes',
  3172. false => 'no',
  3173. },
  3174. },
  3175. ],
  3176. },
  3177. state: false,
  3178. preferences: {
  3179. prio: 1,
  3180. authentication: true,
  3181. permission: ['admin.integration'],
  3182. },
  3183. frontend: true
  3184. )
  3185. Setting.create_if_not_exists(
  3186. title: 'Exchange config',
  3187. name: 'exchange_config',
  3188. area: 'Integration::Exchange',
  3189. description: 'Defines the Exchange config.',
  3190. options: {},
  3191. state: {},
  3192. preferences: {
  3193. prio: 2,
  3194. permission: ['admin.integration'],
  3195. },
  3196. frontend: false,
  3197. )
  3198. Setting.create_if_not_exists(
  3199. title: 'Exchange integration',
  3200. name: 'exchange_integration',
  3201. area: 'Integration::Switch',
  3202. description: 'Defines if Exchange is enabled or not.',
  3203. options: {
  3204. form: [
  3205. {
  3206. display: '',
  3207. null: true,
  3208. name: 'exchange_integration',
  3209. tag: 'boolean',
  3210. options: {
  3211. true => 'yes',
  3212. false => 'no',
  3213. },
  3214. },
  3215. ],
  3216. },
  3217. state: false,
  3218. preferences: {
  3219. prio: 1,
  3220. authentication: true,
  3221. permission: ['admin.integration'],
  3222. },
  3223. frontend: true
  3224. )
  3225. Setting.create_if_not_exists(
  3226. title: 'LDAP config',
  3227. name: 'ldap_config',
  3228. area: 'Integration::LDAP',
  3229. description: 'Defines the LDAP config.',
  3230. options: {},
  3231. state: {},
  3232. preferences: {
  3233. prio: 2,
  3234. permission: ['admin.integration'],
  3235. },
  3236. frontend: false,
  3237. )
  3238. Setting.create_if_not_exists(
  3239. title: 'i-doit integration',
  3240. name: 'idoit_integration',
  3241. area: 'Integration::Switch',
  3242. description: 'Defines if i-doit (http://www.i-doit) is enabled or not.',
  3243. options: {
  3244. form: [
  3245. {
  3246. display: '',
  3247. null: true,
  3248. name: 'idoit_integration',
  3249. tag: 'boolean',
  3250. options: {
  3251. true => 'yes',
  3252. false => 'no',
  3253. },
  3254. },
  3255. ],
  3256. },
  3257. state: false,
  3258. preferences: {
  3259. prio: 1,
  3260. authentication: true,
  3261. permission: ['admin.integration'],
  3262. },
  3263. frontend: true
  3264. )
  3265. Setting.create_if_not_exists(
  3266. title: 'i-doit config',
  3267. name: 'idoit_config',
  3268. area: 'Integration::Idoit',
  3269. description: 'Defines the i-doit config.',
  3270. options: {},
  3271. state: {},
  3272. preferences: {
  3273. prio: 2,
  3274. permission: ['admin.integration'],
  3275. },
  3276. frontend: false,
  3277. )
  3278. Setting.create_if_not_exists(
  3279. title: 'Defines sync transaction backend.',
  3280. name: '0100_trigger',
  3281. area: 'Transaction::Backend::Sync',
  3282. description: 'Defines the transaction backend to execute triggers.',
  3283. options: {},
  3284. state: 'Transaction::Trigger',
  3285. frontend: false
  3286. )
  3287. Setting.create_if_not_exists(
  3288. title: 'Defines transaction backend.',
  3289. name: '0100_notification',
  3290. area: 'Transaction::Backend::Async',
  3291. description: 'Defines the transaction backend to send agent notifications.',
  3292. options: {},
  3293. state: 'Transaction::Notification',
  3294. frontend: false
  3295. )
  3296. Setting.create_if_not_exists(
  3297. title: 'Defines transaction backend.',
  3298. name: '1000_signature_detection',
  3299. area: 'Transaction::Backend::Async',
  3300. description: 'Defines the transaction backend to detect customer signatures in emails.',
  3301. options: {},
  3302. state: 'Transaction::SignatureDetection',
  3303. frontend: false
  3304. )
  3305. Setting.create_if_not_exists(
  3306. title: 'Defines transaction backend.',
  3307. name: '6000_slack_webhook',
  3308. area: 'Transaction::Backend::Async',
  3309. description: 'Defines the transaction backend which posts messages to Slack (http://www.slack.com).',
  3310. options: {},
  3311. state: 'Transaction::Slack',
  3312. frontend: false
  3313. )
  3314. Setting.create_if_not_exists(
  3315. title: 'Slack integration',
  3316. name: 'slack_integration',
  3317. area: 'Integration::Switch',
  3318. description: 'Defines if Slack (http://www.slack.org) is enabled or not.',
  3319. options: {
  3320. form: [
  3321. {
  3322. display: '',
  3323. null: true,
  3324. name: 'slack_integration',
  3325. tag: 'boolean',
  3326. options: {
  3327. true => 'yes',
  3328. false => 'no',
  3329. },
  3330. },
  3331. ],
  3332. },
  3333. state: false,
  3334. preferences: {
  3335. prio: 1,
  3336. permission: ['admin.integration'],
  3337. },
  3338. frontend: false
  3339. )
  3340. Setting.create_if_not_exists(
  3341. title: 'Slack config',
  3342. name: 'slack_config',
  3343. area: 'Integration::Slack',
  3344. description: 'Defines the slack config.',
  3345. options: {},
  3346. state: {
  3347. items: []
  3348. },
  3349. preferences: {
  3350. prio: 2,
  3351. permission: ['admin.integration'],
  3352. },
  3353. frontend: false,
  3354. )
  3355. Setting.create_if_not_exists(
  3356. title: 'sipgate.io integration',
  3357. name: 'sipgate_integration',
  3358. area: 'Integration::Switch',
  3359. description: 'Defines if sipgate.io (http://www.sipgate.io) is enabled or not.',
  3360. options: {
  3361. form: [
  3362. {
  3363. display: '',
  3364. null: true,
  3365. name: 'sipgate_integration',
  3366. tag: 'boolean',
  3367. options: {
  3368. true => 'yes',
  3369. false => 'no',
  3370. },
  3371. },
  3372. ],
  3373. },
  3374. state: false,
  3375. preferences: {
  3376. prio: 1,
  3377. trigger: ['menu:render', 'cti:reload'],
  3378. authentication: true,
  3379. permission: ['admin.integration'],
  3380. },
  3381. frontend: true
  3382. )
  3383. Setting.create_if_not_exists(
  3384. title: 'sipgate.io config',
  3385. name: 'sipgate_config',
  3386. area: 'Integration::Sipgate',
  3387. description: 'Defines the sipgate.io config.',
  3388. options: {},
  3389. state: {},
  3390. preferences: {
  3391. prio: 2,
  3392. permission: ['admin.integration'],
  3393. },
  3394. frontend: false,
  3395. )
  3396. Setting.create_if_not_exists(
  3397. title: 'Clearbit integration',
  3398. name: 'clearbit_integration',
  3399. area: 'Integration::Switch',
  3400. description: 'Defines if Clearbit (http://www.clearbit.com) is enabled or not.',
  3401. options: {
  3402. form: [
  3403. {
  3404. display: '',
  3405. null: true,
  3406. name: 'clearbit_integration',
  3407. tag: 'boolean',
  3408. options: {
  3409. true => 'yes',
  3410. false => 'no',
  3411. },
  3412. },
  3413. ],
  3414. },
  3415. state: false,
  3416. preferences: {
  3417. prio: 1,
  3418. permission: ['admin.integration'],
  3419. },
  3420. frontend: false
  3421. )
  3422. Setting.create_if_not_exists(
  3423. title: 'Clearbit config',
  3424. name: 'clearbit_config',
  3425. area: 'Integration::Clearbit',
  3426. description: 'Defines the Clearbit config.',
  3427. options: {},
  3428. state: {},
  3429. frontend: false,
  3430. preferences: {
  3431. prio: 2,
  3432. permission: ['admin.integration'],
  3433. },
  3434. )
  3435. Setting.create_if_not_exists(
  3436. title: 'Defines transaction backend.',
  3437. name: '9000_clearbit_enrichment',
  3438. area: 'Transaction::Backend::Async',
  3439. description: 'Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com).',
  3440. options: {},
  3441. state: 'Transaction::ClearbitEnrichment',
  3442. frontend: false
  3443. )
  3444. Setting.create_if_not_exists(
  3445. title: 'Defines transaction backend.',
  3446. name: '9100_cti_caller_id_detection',
  3447. area: 'Transaction::Backend::Async',
  3448. description: 'Defines the transaction backend which detects caller IDs in objects and store them for CTI lookups.',
  3449. options: {},
  3450. state: 'Transaction::CtiCallerIdDetection',
  3451. frontend: false
  3452. )
  3453. Setting.create_if_not_exists(
  3454. title: 'Defines transaction backend.',
  3455. name: '9200_karma',
  3456. area: 'Transaction::Backend::Async',
  3457. description: 'Defines the transaction backend which creates the karma score.',
  3458. options: {},
  3459. state: 'Transaction::Karma',
  3460. frontend: false
  3461. )
  3462. Setting.create_if_not_exists(
  3463. title: 'Defines karma levels.',
  3464. name: 'karma_levels',
  3465. area: 'Core::Karma',
  3466. description: 'Defines the karma levels.',
  3467. options: {},
  3468. state: [
  3469. {
  3470. name: 'Beginner',
  3471. start: 0,
  3472. end: 499,
  3473. },
  3474. {
  3475. name: 'Newbie',
  3476. start: 500,
  3477. end: 1999,
  3478. },
  3479. {
  3480. name: 'Intermediate',
  3481. start: 2000,
  3482. end: 4999,
  3483. },
  3484. {
  3485. name: 'Professional',
  3486. start: 5000,
  3487. end: 6999,
  3488. },
  3489. {
  3490. name: 'Expert',
  3491. start: 7000,
  3492. end: 8999,
  3493. },
  3494. {
  3495. name: 'Master',
  3496. start: 9000,
  3497. end: 18_999,
  3498. },
  3499. {
  3500. name: 'Evangelist',
  3501. start: 19_000,
  3502. end: 45_999,
  3503. },
  3504. {
  3505. name: 'Hero',
  3506. start: 50_000,
  3507. end: nil,
  3508. },
  3509. ],
  3510. frontend: false
  3511. )
  3512. Setting.create_if_not_exists(
  3513. title: 'Set limit of agents',
  3514. name: 'system_agent_limit',
  3515. area: 'Core::Online',
  3516. description: 'Defines the limit of the agents.',
  3517. options: {},
  3518. state: false,
  3519. preferences: { online_service_disable: true },
  3520. frontend: false
  3521. )