settings.rb 142 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. Setting.create_if_not_exists(
  3. title: __('Application secret'),
  4. name: 'application_secret',
  5. area: 'Core',
  6. description: __('Defines the random application secret.'),
  7. options: {},
  8. state: SecureRandom.hex(128),
  9. preferences: {
  10. permission: ['admin'],
  11. protected: true,
  12. },
  13. frontend: false
  14. )
  15. Setting.create_if_not_exists(
  16. title: __('System Init Done'),
  17. name: 'system_init_done',
  18. area: 'Core',
  19. description: __('Defines if application is in init mode.'),
  20. options: {},
  21. state: false,
  22. preferences: { online_service_disable: true },
  23. frontend: true
  24. )
  25. Setting.create_if_not_exists(
  26. title: __('App Version'),
  27. name: 'app_version',
  28. area: 'Core::WebApp',
  29. description: __('Only used internally to propagate current web app version to clients.'),
  30. options: {},
  31. state: '',
  32. preferences: { online_service_disable: true },
  33. frontend: false
  34. )
  35. Setting.create_if_not_exists(
  36. title: __('Maintenance Mode'),
  37. name: 'maintenance_mode',
  38. area: 'Core::WebApp',
  39. 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.'),
  40. options: {},
  41. state: false,
  42. preferences: {
  43. permission: ['admin.maintenance'],
  44. },
  45. frontend: true
  46. )
  47. Setting.create_if_not_exists(
  48. title: __('Maintenance Login'),
  49. name: 'maintenance_login',
  50. area: 'Core::WebApp',
  51. description: __('Put a message on the login page. To change it, click on the text area below and change it in-line.'),
  52. options: {},
  53. state: false,
  54. preferences: {
  55. permission: ['admin.maintenance'],
  56. },
  57. frontend: true
  58. )
  59. Setting.create_if_not_exists(
  60. title: __('Maintenance Login'),
  61. name: 'maintenance_login_message',
  62. area: 'Core::WebApp',
  63. description: __('Message for login page.'),
  64. options: {},
  65. state: __('This is a default maintenance message. Click here to change.'),
  66. preferences: {
  67. permission: ['admin.maintenance'],
  68. },
  69. frontend: true
  70. )
  71. Setting.create_if_not_exists(
  72. title: __('Developer System'),
  73. name: 'developer_mode',
  74. area: 'Core::Develop',
  75. description: __('Defines if the application is in developer mode (all users have the same password and password reset will work without email delivery).'),
  76. options: {},
  77. state: Rails.env.development?,
  78. preferences: { online_service_disable: true },
  79. frontend: true
  80. )
  81. Setting.create_if_not_exists(
  82. title: __('Online Service'),
  83. name: 'system_online_service',
  84. area: 'Core',
  85. description: __('Defines if application is used as online service.'),
  86. options: {},
  87. state: false,
  88. preferences: { online_service_disable: true },
  89. frontend: true
  90. )
  91. Setting.create_if_not_exists(
  92. title: __('Product Name'),
  93. name: 'product_name',
  94. area: 'System::Branding',
  95. description: __('Defines the name of the application, shown in the web interface, tabs, and title bar of the web browser.'),
  96. options: {
  97. form: [
  98. {
  99. display: '',
  100. null: false,
  101. name: 'product_name',
  102. tag: 'input',
  103. },
  104. ],
  105. },
  106. preferences: {
  107. render: true,
  108. prio: 1,
  109. placeholder: true,
  110. permission: ['admin.branding'],
  111. },
  112. state: __('Zammad Helpdesk'),
  113. frontend: true
  114. )
  115. Setting.create_if_not_exists(
  116. title: __('Logo'),
  117. name: 'product_logo',
  118. area: 'System::Branding',
  119. description: __('Defines the logo of the application, shown in the web interface.'),
  120. options: {
  121. form: [
  122. {
  123. display: '',
  124. null: false,
  125. name: 'product_logo',
  126. tag: 'input',
  127. },
  128. ],
  129. },
  130. preferences: {
  131. prio: 3,
  132. controller: 'SettingsAreaLogo',
  133. permission: ['admin.branding'],
  134. },
  135. state: 'logo.svg',
  136. frontend: true
  137. )
  138. Setting.create_if_not_exists(
  139. title: __('Organization'),
  140. name: 'organization',
  141. area: 'System::Branding',
  142. description: __('Will be shown in the app and is included in email footers.'),
  143. options: {
  144. form: [
  145. {
  146. display: '',
  147. null: false,
  148. name: 'organization',
  149. tag: 'input',
  150. },
  151. ],
  152. },
  153. state: '',
  154. preferences: {
  155. prio: 2,
  156. placeholder: true,
  157. permission: ['admin.branding'],
  158. },
  159. frontend: true
  160. )
  161. Setting.create_if_not_exists(
  162. title: __('Locale'),
  163. name: 'locale_default',
  164. area: 'System::Branding',
  165. description: __('Defines the default system language.'),
  166. options: {
  167. form: [
  168. {
  169. name: 'locale_default',
  170. }
  171. ],
  172. },
  173. state: 'en-us',
  174. preferences: {
  175. prio: 8,
  176. controller: 'SettingsAreaItemDefaultLocale',
  177. permission: ['admin.system'],
  178. },
  179. frontend: true
  180. )
  181. Setting.create_if_not_exists(
  182. title: __('Timezone'),
  183. name: 'timezone_default',
  184. area: 'System::Branding',
  185. description: __('Defines the default system timezone.'),
  186. options: {
  187. form: [
  188. {
  189. name: 'timezone_default',
  190. }
  191. ],
  192. },
  193. state: '',
  194. preferences: {
  195. prio: 9,
  196. controller: 'SettingsAreaItemDefaultTimezone',
  197. permission: ['admin.system'],
  198. },
  199. frontend: true
  200. )
  201. Setting.create_or_update(
  202. title: __('Pretty Date'),
  203. name: 'pretty_date_format',
  204. area: 'System::Branding',
  205. description: __('Defines pretty date format.'),
  206. options: {
  207. form: [
  208. {
  209. display: '',
  210. null: false,
  211. name: 'pretty_date_format',
  212. tag: 'select',
  213. options: {
  214. relative: __('relative - e. g. "2 hours ago" or "2 days and 15 minutes ago"'),
  215. absolute: __('absolute - e. g. "Monday 09:30" or "Tuesday 23. Feb 14:20"'),
  216. timestamp: __('timestamp - e. g. "2018-08-30 14:30"'),
  217. },
  218. translate: true,
  219. },
  220. ],
  221. },
  222. preferences: {
  223. render: true,
  224. prio: 10,
  225. permission: ['admin.branding'],
  226. },
  227. state: 'relative',
  228. frontend: true
  229. )
  230. options = {}
  231. (10..99).each do |item|
  232. options[item] = item
  233. end
  234. system_id = rand(10..99) # rubocop:disable Zammad/ForbidRand
  235. Setting.create_if_not_exists(
  236. title: __('SystemID'),
  237. name: 'system_id',
  238. area: 'System::Base',
  239. 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).'),
  240. options: {
  241. form: [
  242. {
  243. display: '',
  244. null: true,
  245. name: 'system_id',
  246. tag: 'select',
  247. options: options,
  248. },
  249. ],
  250. },
  251. state: system_id,
  252. preferences: {
  253. online_service_disable: true,
  254. placeholder: true,
  255. authentication: true,
  256. permission: ['admin.system'],
  257. },
  258. frontend: true
  259. )
  260. Setting.create_if_not_exists(
  261. title: __('Fully Qualified Domain Name'),
  262. name: 'fqdn',
  263. area: 'System::Base',
  264. 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
  265. options: {
  266. form: [
  267. {
  268. display: '',
  269. null: false,
  270. name: 'fqdn',
  271. tag: 'input',
  272. },
  273. ],
  274. },
  275. state: 'zammad.example.com',
  276. preferences: {
  277. online_service_disable: true,
  278. placeholder: true,
  279. permission: ['admin.system'],
  280. },
  281. frontend: true
  282. )
  283. Setting.create_if_not_exists(
  284. title: __('Websocket backend'),
  285. name: 'websocket_backend',
  286. area: 'System::WebSocket',
  287. description: __('Defines how to reach websocket server. "websocket" is default on production, "websocketPort" is for CI'),
  288. state: Rails.env.production? ? 'websocket' : 'websocketPort',
  289. frontend: true
  290. )
  291. Setting.create_if_not_exists(
  292. title: __('Websocket port'),
  293. name: 'websocket_port',
  294. area: 'System::WebSocket',
  295. description: __('Defines the port of the websocket server.'),
  296. options: {
  297. form: [
  298. {
  299. display: '',
  300. null: false,
  301. name: 'websocket_port',
  302. tag: 'input',
  303. },
  304. ],
  305. },
  306. state: '6042',
  307. preferences: { online_service_disable: true },
  308. frontend: true
  309. )
  310. Setting.create_if_not_exists(
  311. title: __('HTTP type'),
  312. name: 'http_type',
  313. area: 'System::Base',
  314. description: __('Defines the HTTP protocol of your instance.'),
  315. options: {
  316. form: [
  317. {
  318. display: '',
  319. null: true,
  320. name: 'http_type',
  321. tag: 'select',
  322. options: {
  323. 'https' => 'https',
  324. 'http' => 'http',
  325. },
  326. },
  327. ],
  328. },
  329. state: 'http',
  330. preferences: {
  331. online_service_disable: true,
  332. placeholder: true,
  333. permission: ['admin.system'],
  334. },
  335. frontend: true
  336. )
  337. Setting.create_if_not_exists(
  338. title: __('Storage Mechanism'),
  339. name: 'storage_provider',
  340. area: 'System::Storage',
  341. 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.'),
  342. options: {
  343. form: [
  344. {
  345. display: '',
  346. null: true,
  347. name: 'storage_provider',
  348. tag: 'select',
  349. tranlate: true,
  350. options: {
  351. 'DB' => __('Database'),
  352. 'File' => __('Filesystem'),
  353. },
  354. translate: true,
  355. },
  356. ],
  357. },
  358. state: 'DB',
  359. preferences: {
  360. controller: 'SettingsAreaStorageProvider',
  361. online_service_disable: true,
  362. permission: ['admin.system'],
  363. },
  364. frontend: false
  365. )
  366. Setting.create_if_not_exists(
  367. title: __('Image Service'),
  368. name: 'image_backend',
  369. area: 'System::Services',
  370. description: __('Defines the backend for user and organization image lookups.'),
  371. options: {
  372. form: [
  373. {
  374. display: '',
  375. null: true,
  376. name: 'image_backend',
  377. tag: 'select',
  378. options: {
  379. '' => '-',
  380. 'Service::Image::Zammad' => __('Zammad Image Service'),
  381. },
  382. },
  383. ],
  384. },
  385. state: 'Service::Image::Zammad',
  386. preferences: {
  387. prio: 1,
  388. permission: ['admin.system'],
  389. },
  390. frontend: false
  391. )
  392. Setting.create_if_not_exists(
  393. title: __('Geo IP Service'),
  394. name: 'geo_ip_backend',
  395. area: 'System::Services',
  396. description: __('Defines the backend for geo IP lookups. Also shows location of an IP address if it is traceable.'),
  397. options: {
  398. form: [
  399. {
  400. display: '',
  401. null: true,
  402. name: 'geo_ip_backend',
  403. tag: 'select',
  404. options: {
  405. '' => '-',
  406. 'Service::GeoIp::Zammad' => __('Zammad GeoIP Service'),
  407. },
  408. },
  409. ],
  410. },
  411. state: 'Service::GeoIp::Zammad',
  412. preferences: {
  413. prio: 2,
  414. permission: ['admin.system'],
  415. },
  416. frontend: false
  417. )
  418. Setting.create_if_not_exists(
  419. title: __('Geo Location Service'),
  420. name: 'geo_location_backend',
  421. area: 'System::Services',
  422. description: __('Defines the backend for geo location lookups to store geo locations for addresses.'),
  423. options: {
  424. form: [
  425. {
  426. display: '',
  427. null: true,
  428. name: 'geo_location_backend',
  429. tag: 'select',
  430. options: {
  431. '' => '-',
  432. 'Service::GeoLocation::Gmaps' => __('Google Maps'),
  433. },
  434. },
  435. ],
  436. },
  437. state: 'Service::GeoLocation::Gmaps',
  438. preferences: {
  439. prio: 3,
  440. permission: ['admin.system'],
  441. },
  442. frontend: false
  443. )
  444. Setting.create_if_not_exists(
  445. title: __('Geo Calendar Service'),
  446. name: 'geo_calendar_backend',
  447. area: 'System::Services',
  448. description: __('Defines the backend for geo calendar lookups. Used for initial calendar succession.'),
  449. options: {
  450. form: [
  451. {
  452. display: '',
  453. null: true,
  454. name: 'geo_calendar_backend',
  455. tag: 'select',
  456. options: {
  457. '' => '-',
  458. 'Service::GeoCalendar::Zammad' => __('Zammad GeoCalendar Service'),
  459. },
  460. },
  461. ],
  462. },
  463. state: 'Service::GeoCalendar::Zammad',
  464. preferences: {
  465. prio: 2,
  466. permission: ['admin.system'],
  467. },
  468. frontend: false
  469. )
  470. Setting.create_if_not_exists(
  471. title: __('Proxy Settings'),
  472. name: 'proxy',
  473. area: 'System::Network',
  474. description: __('Address of the proxy server for http and https resources.'),
  475. options: {
  476. form: [
  477. {
  478. display: '',
  479. null: false,
  480. name: 'proxy',
  481. tag: 'input',
  482. placeholder: 'proxy.example.com:3128',
  483. },
  484. ],
  485. },
  486. state: '',
  487. preferences: {
  488. online_service_disable: true,
  489. controller: 'SettingsAreaProxy',
  490. prio: 1,
  491. permission: ['admin.system'],
  492. },
  493. frontend: false
  494. )
  495. Setting.create_if_not_exists(
  496. title: __('Proxy User'),
  497. name: 'proxy_username',
  498. area: 'System::Network',
  499. description: __('Username for proxy connection.'),
  500. options: {
  501. form: [
  502. {
  503. display: '',
  504. null: false,
  505. name: 'proxy_username',
  506. tag: 'input',
  507. },
  508. ],
  509. },
  510. state: '',
  511. preferences: {
  512. disabled: true,
  513. online_service_disable: true,
  514. prio: 2,
  515. permission: ['admin.system'],
  516. },
  517. frontend: false
  518. )
  519. Setting.create_if_not_exists(
  520. title: __('Proxy Password'),
  521. name: 'proxy_password',
  522. area: 'System::Network',
  523. description: __('Password for proxy connection.'),
  524. options: {
  525. form: [
  526. {
  527. display: '',
  528. null: false,
  529. name: 'proxy_password',
  530. tag: 'input',
  531. },
  532. ],
  533. },
  534. state: '',
  535. preferences: {
  536. disabled: true,
  537. online_service_disable: true,
  538. prio: 3,
  539. permission: ['admin.system'],
  540. },
  541. frontend: false
  542. )
  543. Setting.create_if_not_exists(
  544. title: __('No Proxy'),
  545. name: 'proxy_no',
  546. area: 'System::Network',
  547. description: __('No proxy for the following hosts.'),
  548. options: {
  549. form: [
  550. {
  551. display: '',
  552. null: false,
  553. name: 'proxy_no',
  554. tag: 'input',
  555. },
  556. ],
  557. },
  558. state: 'localhost,127.0.0.0,::1',
  559. preferences: {
  560. disabled: true,
  561. online_service_disable: true,
  562. prio: 4,
  563. permission: ['admin.system'],
  564. },
  565. frontend: false
  566. )
  567. Setting.create_if_not_exists(
  568. title: __('Core Workflow Ajax Mode'),
  569. name: 'core_workflow_ajax_mode',
  570. area: 'System::UI',
  571. description: __('Defines if the core workflow communication should run over ajax instead of websockets.'),
  572. options: {
  573. form: [
  574. {
  575. display: '',
  576. null: true,
  577. name: 'core_workflow_ajax_mode',
  578. tag: 'boolean',
  579. options: {
  580. true => 'yes',
  581. false => 'no',
  582. },
  583. },
  584. ],
  585. },
  586. state: false,
  587. preferences: {
  588. prio: 3,
  589. permission: ['admin.system'],
  590. },
  591. frontend: true
  592. )
  593. Setting.create_if_not_exists(
  594. title: __('User Organization Selector - email'),
  595. name: 'ui_user_organization_selector_with_email',
  596. area: 'UI::UserOrganizatiomSelector',
  597. description: __('Defines if the email should be displayed in the result of the user/organization widget.'),
  598. options: {
  599. form: [
  600. {
  601. display: '',
  602. null: true,
  603. name: 'ui_user_organization_selector_with_email',
  604. tag: 'boolean',
  605. translate: true,
  606. options: {
  607. true => 'yes',
  608. false => 'no',
  609. },
  610. },
  611. ],
  612. },
  613. state: false,
  614. preferences: {
  615. prio: 100,
  616. permission: ['admin.ui'],
  617. },
  618. frontend: true
  619. )
  620. Setting.create_if_not_exists(
  621. title: __('Note - default visibility'),
  622. name: 'ui_ticket_zoom_article_note_new_internal',
  623. area: 'UI::TicketZoom',
  624. description: __('Defines the default visibility for new notes.'),
  625. options: {
  626. form: [
  627. {
  628. display: '',
  629. null: true,
  630. name: 'ui_ticket_zoom_article_note_new_internal',
  631. tag: 'boolean',
  632. translate: true,
  633. options: {
  634. true => 'internal',
  635. false => 'public',
  636. },
  637. },
  638. ],
  639. },
  640. state: true,
  641. preferences: {
  642. prio: 100,
  643. permission: ['admin.ui'],
  644. },
  645. frontend: true
  646. )
  647. Setting.create_if_not_exists(
  648. title: __('Article - visibility confirmation dialog'),
  649. name: 'ui_ticket_zoom_article_visibility_confirmation_dialog',
  650. area: 'UI::TicketZoom',
  651. description: __('Defines if the agent has to accept a confirmation dialog when changing the article visibility to "public".'),
  652. options: {
  653. form: [
  654. {
  655. display: '',
  656. null: true,
  657. name: 'ui_ticket_zoom_article_visibility_confirmation_dialog',
  658. tag: 'boolean',
  659. options: {
  660. true => 'yes',
  661. false => 'no',
  662. },
  663. },
  664. ],
  665. },
  666. state: false,
  667. preferences: {
  668. prio: 100,
  669. permission: ['admin.ui'],
  670. },
  671. frontend: true
  672. )
  673. Setting.create_if_not_exists(
  674. title: __('Email - subject field'),
  675. name: 'ui_ticket_zoom_article_email_subject',
  676. area: 'UI::TicketZoom',
  677. description: __('Use subject field for emails. If disabled, the ticket title will be used as subject.'),
  678. options: {
  679. form: [
  680. {
  681. display: '',
  682. null: true,
  683. name: 'ui_ticket_zoom_article_email_subject',
  684. tag: 'boolean',
  685. translate: true,
  686. options: {
  687. true => 'yes',
  688. false => 'no',
  689. },
  690. },
  691. ],
  692. },
  693. state: false,
  694. preferences: {
  695. prio: 200,
  696. permission: ['admin.ui'],
  697. },
  698. frontend: true
  699. )
  700. Setting.create_if_not_exists(
  701. title: __('Email - full quote'),
  702. name: 'ui_ticket_zoom_article_email_full_quote',
  703. area: 'UI::TicketZoom',
  704. 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).'),
  705. options: {
  706. form: [
  707. {
  708. display: '',
  709. null: true,
  710. name: 'ui_ticket_zoom_article_email_full_quote',
  711. tag: 'boolean',
  712. translate: true,
  713. options: {
  714. true => 'yes',
  715. false => 'no',
  716. },
  717. },
  718. ],
  719. },
  720. state: false,
  721. preferences: {
  722. prio: 220,
  723. permission: ['admin.ui'],
  724. },
  725. frontend: true
  726. )
  727. Setting.create_if_not_exists(
  728. title: __('Email - quote header'),
  729. name: 'ui_ticket_zoom_article_email_full_quote_header',
  730. area: 'UI::TicketZoom',
  731. description: __('Enable if you want a timestamped reply header to be automatically inserted in front of quoted messages.'),
  732. options: {
  733. form: [
  734. {
  735. display: '',
  736. null: true,
  737. name: 'ui_ticket_zoom_article_email_full_quote_header',
  738. tag: 'boolean',
  739. translate: true,
  740. options: {
  741. true => 'yes',
  742. false => 'no',
  743. },
  744. },
  745. ],
  746. },
  747. state: true,
  748. preferences: {
  749. prio: 240,
  750. permission: ['admin.ui'],
  751. },
  752. frontend: true
  753. )
  754. Setting.create_if_not_exists(
  755. title: __('Twitter - tweet initials'),
  756. name: 'ui_ticket_zoom_article_twitter_initials',
  757. area: 'UI::TicketZoom',
  758. description: __('Add sender initials to end of a tweet.'),
  759. options: {
  760. form: [
  761. {
  762. display: '',
  763. null: true,
  764. name: 'ui_ticket_zoom_article_twitter_initials',
  765. tag: 'boolean',
  766. translate: true,
  767. options: {
  768. true => 'yes',
  769. false => 'no',
  770. },
  771. },
  772. ],
  773. },
  774. state: true,
  775. preferences: {
  776. prio: 300,
  777. permission: ['admin.ui'],
  778. },
  779. frontend: true
  780. )
  781. Setting.create_if_not_exists(
  782. title: __('Sidebar Attachments'),
  783. name: 'ui_ticket_zoom_attachments_preview',
  784. area: 'UI::TicketZoom::Preview',
  785. description: __('Enables preview of attachments.'),
  786. options: {
  787. form: [
  788. {
  789. display: '',
  790. null: true,
  791. name: 'ui_ticket_zoom_attachments_preview',
  792. tag: 'boolean',
  793. translate: true,
  794. options: {
  795. true => 'yes',
  796. false => 'no',
  797. },
  798. },
  799. ],
  800. },
  801. state: true,
  802. preferences: {
  803. prio: 400,
  804. permission: ['admin.ui'],
  805. },
  806. frontend: true
  807. )
  808. Setting.create_if_not_exists(
  809. title: __('Sidebar Attachments'),
  810. name: 'ui_ticket_zoom_sidebar_article_attachments',
  811. area: 'UI::TicketZoom::Preview',
  812. description: __('Enables a sidebar to show an overview of all attachments.'),
  813. options: {
  814. form: [
  815. {
  816. display: '',
  817. null: true,
  818. name: 'ui_ticket_zoom_sidebar_article_attachments',
  819. tag: 'boolean',
  820. translate: true,
  821. options: {
  822. true => 'yes',
  823. false => 'no',
  824. },
  825. },
  826. ],
  827. },
  828. state: false,
  829. preferences: {
  830. prio: 500,
  831. permission: ['admin.ui'],
  832. },
  833. frontend: true
  834. )
  835. Setting.create_if_not_exists(
  836. title: __('Set notes for ticket create types.'),
  837. name: 'ui_ticket_create_notes',
  838. area: 'UI::TicketCreate',
  839. description: __('Set notes for ticket create types by selecting type.'),
  840. options: {},
  841. state: {
  842. # 'email-out' => __('Attention: When creating a ticket an email is sent.'),
  843. },
  844. preferences: {
  845. permission: ['admin.ui'],
  846. },
  847. frontend: true
  848. )
  849. Setting.create_if_not_exists(
  850. title: __('Default type for a new ticket'),
  851. name: 'ui_ticket_create_default_type',
  852. area: 'UI::TicketCreate',
  853. description: __('Select default ticket type'),
  854. options: {
  855. form: [
  856. {
  857. display: '',
  858. null: false,
  859. multiple: false,
  860. name: 'ui_ticket_create_default_type',
  861. tag: 'select',
  862. options: {
  863. 'phone-in' => '1. Phone inbound',
  864. 'phone-out' => '2. Phone outbound',
  865. 'email-out' => '3. Email outbound',
  866. },
  867. },
  868. ],
  869. },
  870. state: 'phone-in',
  871. preferences: {
  872. permission: ['admin.ui']
  873. },
  874. frontend: true
  875. )
  876. Setting.create_if_not_exists(
  877. title: __('Available types for a new ticket'),
  878. name: 'ui_ticket_create_available_types',
  879. area: 'UI::TicketCreate',
  880. description: __('Set available ticket types'),
  881. options: {
  882. form: [
  883. {
  884. display: '',
  885. null: false,
  886. multiple: true,
  887. name: 'ui_ticket_create_available_types',
  888. tag: 'select',
  889. options: {
  890. 'phone-in' => '1. Phone inbound',
  891. 'phone-out' => '2. Phone outbound',
  892. 'email-out' => '3. Email outbound',
  893. },
  894. },
  895. ],
  896. },
  897. state: %w[phone-in phone-out email-out],
  898. preferences: {
  899. permission: ['admin.ui']
  900. },
  901. frontend: true
  902. )
  903. Setting.create_if_not_exists(
  904. title: __('Open ticket indicator'),
  905. name: 'ui_sidebar_open_ticket_indicator_colored',
  906. area: 'UI::Sidebar',
  907. description: __('Color representation of the open ticket indicator in the sidebar.'),
  908. options: {
  909. form: [
  910. {
  911. display: '',
  912. null: true,
  913. name: 'ui_sidebar_open_ticket_indicator_colored',
  914. tag: 'boolean',
  915. translate: true,
  916. options: {
  917. true => 'yes',
  918. false => 'no',
  919. },
  920. },
  921. ],
  922. },
  923. state: false,
  924. preferences: {
  925. permission: ['admin.ui'],
  926. },
  927. frontend: true
  928. )
  929. Setting.create_if_not_exists(
  930. title: __('Open ticket indicator'),
  931. name: 'ui_table_group_by_show_count',
  932. area: 'UI::Base',
  933. description: __('Total display of the number of objects in a grouping.'),
  934. options: {
  935. form: [
  936. {
  937. display: '',
  938. null: true,
  939. name: 'ui_table_group_by_show_count',
  940. tag: 'boolean',
  941. translate: true,
  942. options: {
  943. true => 'yes',
  944. false => 'no',
  945. },
  946. },
  947. ],
  948. },
  949. state: false,
  950. preferences: {
  951. permission: ['admin.ui'],
  952. },
  953. frontend: true
  954. )
  955. Setting.create_if_not_exists(
  956. title: __('Priority Icons in Overviews'),
  957. name: 'ui_ticket_overview_priority_icon',
  958. area: 'UI::TicketOverview::PriorityIcons',
  959. description: __('Enables priority icons in ticket overviews.'),
  960. options: {
  961. form: [
  962. {
  963. display: '',
  964. null: true,
  965. name: 'ui_ticket_overview_priority_icon',
  966. tag: 'boolean',
  967. translate: true,
  968. options: {
  969. true => 'yes',
  970. false => 'no',
  971. },
  972. },
  973. ],
  974. },
  975. state: false,
  976. preferences: {
  977. prio: 500,
  978. permission: ['admin.ui'],
  979. },
  980. frontend: true
  981. )
  982. Setting.create_if_not_exists(
  983. title: __('Maximum number of ticket shown in overviews'),
  984. name: 'ui_ticket_overview_ticket_limit',
  985. area: 'UI::TicketOverview::TicketLimit',
  986. description: __('Define the maximum number of ticket shown in overviews.'),
  987. options: {},
  988. state: 2000,
  989. preferences: {
  990. permission: ['admin.overview'],
  991. },
  992. frontend: true
  993. )
  994. Setting.create_if_not_exists(
  995. title: __('Maximum number of open tabs.'),
  996. name: 'ui_task_mananger_max_task_count',
  997. area: 'UI::TaskManager::Task::MaxCount',
  998. description: __('Defines the maximum number of allowed open tabs before auto cleanup removes surplus tabs when creating new tabs.'),
  999. options: {},
  1000. state: 30,
  1001. preferences: {
  1002. permission: ['admin.ui'],
  1003. },
  1004. frontend: true
  1005. )
  1006. Setting.create_if_not_exists(
  1007. title: __('Password Login'),
  1008. name: 'user_show_password_login',
  1009. area: 'Security::Base',
  1010. description: __('Show password login for users on login page. Disabling only takes effect if third-party authentication is enabled.'),
  1011. options: {
  1012. form: [
  1013. {
  1014. display: '',
  1015. null: true,
  1016. name: 'user_show_password_login',
  1017. tag: 'boolean',
  1018. options: {
  1019. true => 'yes',
  1020. false => 'no',
  1021. },
  1022. },
  1023. ],
  1024. },
  1025. state: true,
  1026. preferences: {
  1027. prio: 5,
  1028. permission: ['admin.security'],
  1029. },
  1030. frontend: true
  1031. )
  1032. Setting.create_if_not_exists(
  1033. title: __('New User Accounts'),
  1034. name: 'user_create_account',
  1035. area: 'Security::Base',
  1036. description: __('Enables users to create their own account via web interface. This setting is only effective if the password login is enabled.'),
  1037. options: {
  1038. form: [
  1039. {
  1040. display: '',
  1041. null: true,
  1042. name: 'user_create_account',
  1043. tag: 'boolean',
  1044. options: {
  1045. true => 'yes',
  1046. false => 'no',
  1047. },
  1048. },
  1049. ],
  1050. },
  1051. state: true,
  1052. preferences: {
  1053. prio: 10,
  1054. permission: ['admin.security'],
  1055. },
  1056. frontend: true
  1057. )
  1058. Setting.create_if_not_exists(
  1059. title: __('Lost Password'),
  1060. name: 'user_lost_password',
  1061. area: 'Security::Base',
  1062. description: __('Activates lost password feature for users. This setting is only effective if the password login is enabled.'),
  1063. options: {
  1064. form: [
  1065. {
  1066. display: '',
  1067. null: true,
  1068. name: 'user_lost_password',
  1069. tag: 'boolean',
  1070. options: {
  1071. true => 'yes',
  1072. false => 'no',
  1073. },
  1074. },
  1075. ],
  1076. },
  1077. state: true,
  1078. preferences: {
  1079. prio: 20,
  1080. permission: ['admin.security'],
  1081. },
  1082. frontend: true
  1083. )
  1084. options = [ { value: '0', name: 'disabled' }, { value: 1.hour.seconds.to_s, name: __('1 hour') }, { value: 2.hours.seconds.to_s, name: __('2 hours') }, { value: 1.day.seconds.to_s, name: __('1 day') }, { value: 7.days.seconds.to_s, name: __('1 week') }, { value: 14.days.seconds.to_s, name: __('2 weeks') }, { value: 21.days.seconds.to_s, name: __('3 weeks') }, { value: 28.days.seconds.to_s, name: __('4 weeks') } ]
  1085. Setting.create_if_not_exists(
  1086. title: __('Session Timeout'),
  1087. name: 'session_timeout',
  1088. area: 'Security::Base',
  1089. description: __('Defines the session timeout for inactivity of users. Based on the assigned permissions the highest timeout value will be used, otherwise the default.'),
  1090. options: {
  1091. form: [
  1092. {
  1093. display: __('Default'),
  1094. null: false,
  1095. name: 'default',
  1096. tag: 'select',
  1097. options: options,
  1098. translate: true,
  1099. },
  1100. {
  1101. display: __('admin'),
  1102. null: false,
  1103. name: 'admin',
  1104. tag: 'select',
  1105. options: options,
  1106. translate: true,
  1107. },
  1108. {
  1109. display: __('ticket.agent'),
  1110. null: false,
  1111. name: 'ticket.agent',
  1112. tag: 'select',
  1113. options: options,
  1114. translate: true,
  1115. },
  1116. {
  1117. display: __('ticket.customer'),
  1118. null: false,
  1119. name: 'ticket.customer',
  1120. tag: 'select',
  1121. options: options,
  1122. translate: true,
  1123. },
  1124. ],
  1125. },
  1126. preferences: {
  1127. prio: 30,
  1128. },
  1129. state: {
  1130. 'default' => 4.weeks.seconds.to_s,
  1131. 'admin' => 4.weeks.seconds.to_s,
  1132. 'ticket.agent' => 4.weeks.seconds.to_s,
  1133. 'ticket.customer' => 4.weeks.seconds.to_s,
  1134. },
  1135. frontend: true
  1136. )
  1137. Setting.create_if_not_exists(
  1138. title: __('User email for multiple users'),
  1139. name: 'user_email_multiple_use',
  1140. area: 'Model::User',
  1141. description: __('Allow using one email address for multiple users.'),
  1142. options: {
  1143. form: [
  1144. {
  1145. display: '',
  1146. null: true,
  1147. name: 'user_email_multiple_use',
  1148. tag: 'boolean',
  1149. options: {
  1150. true => 'yes',
  1151. false => 'no',
  1152. },
  1153. },
  1154. ],
  1155. },
  1156. state: false,
  1157. preferences: {
  1158. permission: ['admin'],
  1159. },
  1160. frontend: false
  1161. )
  1162. Setting.create_if_not_exists(
  1163. title: __('Authentication via %s'),
  1164. name: 'auth_internal',
  1165. area: 'Security::Authentication',
  1166. description: __('Enables user authentication via %s.'),
  1167. preferences: {
  1168. title_i18n: [__('internal database')],
  1169. description_i18n: [__('internal database')],
  1170. permission: ['admin.security'],
  1171. },
  1172. state: {
  1173. priority: 1,
  1174. adapter: 'Auth::Backend::Internal',
  1175. },
  1176. frontend: false
  1177. )
  1178. Setting.create_if_not_exists(
  1179. title: __('Authentication via %s'),
  1180. name: 'auth_developer',
  1181. area: 'Security::Authentication',
  1182. description: __('Enables user authentication via %s.'),
  1183. preferences: {
  1184. title_i18n: [__('developer password')],
  1185. description_i18n: [__('developer password')],
  1186. permission: ['admin.security'],
  1187. },
  1188. state: {
  1189. priority: 2,
  1190. adapter: 'Auth::Backend::Developer',
  1191. },
  1192. frontend: false
  1193. )
  1194. Setting.create_if_not_exists(
  1195. title: __('Authentication via %s'),
  1196. name: 'auth_ldap',
  1197. area: 'Security::Authentication',
  1198. description: __('Enables user authentication via %s.'),
  1199. preferences: {
  1200. title_i18n: [__('LDAP')],
  1201. description_i18n: [__('LDAP')],
  1202. permission: ['admin.security'],
  1203. },
  1204. state: {
  1205. priority: 3,
  1206. adapter: 'Auth::Backend::Ldap',
  1207. host: 'localhost',
  1208. port: 389,
  1209. bind_dn: 'cn=Manager,dc=example,dc=org',
  1210. bind_pw: 'example',
  1211. uid: 'mail',
  1212. base: 'dc=example,dc=org',
  1213. always_filter: '',
  1214. always_roles: %w[Admin Agent],
  1215. always_groups: ['Users'],
  1216. sync_params: {
  1217. firstname: 'sn',
  1218. lastname: 'givenName',
  1219. email: 'mail',
  1220. login: 'mail',
  1221. },
  1222. },
  1223. frontend: false
  1224. )
  1225. Setting.create_if_not_exists(
  1226. title: __('Automatic account link on initial logon'),
  1227. name: 'auth_third_party_auto_link_at_inital_login',
  1228. area: 'Security::ThirdPartyAuthentication',
  1229. description: __('Enables the automatic linking of an existing account on initial login via a third party application. If this is disabled, an existing user must first log into Zammad and then link his "Third Party" account to his Zammad account via Profile -> Linked Accounts.'),
  1230. options: {
  1231. form: [
  1232. {
  1233. display: '',
  1234. null: true,
  1235. name: 'auth_third_party_auto_link_at_inital_login',
  1236. tag: 'boolean',
  1237. options: {
  1238. true => 'yes',
  1239. false => 'no',
  1240. },
  1241. },
  1242. ],
  1243. },
  1244. preferences: {
  1245. permission: ['admin.security'],
  1246. prio: 10,
  1247. },
  1248. state: false,
  1249. frontend: false
  1250. )
  1251. Setting.create_if_not_exists(
  1252. title: __('Automatic account linking notification'),
  1253. name: 'auth_third_party_linking_notification',
  1254. area: 'Security::ThirdPartyAuthentication',
  1255. description: __('Enables sending of an email notification to a user when they link their account with a third-party application.'),
  1256. options: {
  1257. form: [
  1258. {
  1259. display: '',
  1260. null: true,
  1261. name: 'auth_third_party_linking_notification',
  1262. tag: 'boolean',
  1263. options: {
  1264. true => 'yes',
  1265. false => 'no',
  1266. },
  1267. },
  1268. ],
  1269. },
  1270. preferences: {
  1271. permission: ['admin.security'],
  1272. prio: 20,
  1273. },
  1274. state: false,
  1275. frontend: false
  1276. )
  1277. Setting.create_if_not_exists(
  1278. title: __('Authentication via %s'),
  1279. name: 'auth_twitter',
  1280. area: 'Security::ThirdPartyAuthentication',
  1281. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1282. options: {
  1283. form: [
  1284. {
  1285. display: '',
  1286. null: true,
  1287. name: 'auth_twitter',
  1288. tag: 'boolean',
  1289. options: {
  1290. true => 'yes',
  1291. false => 'no',
  1292. },
  1293. },
  1294. ],
  1295. },
  1296. preferences: {
  1297. controller: 'SettingsAreaSwitch',
  1298. sub: ['auth_twitter_credentials'],
  1299. title_i18n: [__('Twitter')],
  1300. description_i18n: [__('Twitter'), __('Twitter Developer Site'), 'https://dev.twitter.com/apps'],
  1301. permission: ['admin.security'],
  1302. },
  1303. state: false,
  1304. frontend: true
  1305. )
  1306. Setting.create_if_not_exists(
  1307. title: __('Twitter App Credentials'),
  1308. name: 'auth_twitter_credentials',
  1309. area: 'Security::ThirdPartyAuthentication::Twitter',
  1310. description: __('App credentials for Twitter.'),
  1311. options: {
  1312. form: [
  1313. {
  1314. display: __('Twitter Key'),
  1315. null: true,
  1316. name: 'key',
  1317. tag: 'input',
  1318. },
  1319. {
  1320. display: __('Twitter Secret'),
  1321. null: true,
  1322. name: 'secret',
  1323. tag: 'input',
  1324. },
  1325. {
  1326. display: __('Your callback URL'),
  1327. null: true,
  1328. name: 'callback_url',
  1329. tag: 'auth_provider',
  1330. provider: 'auth_twitter',
  1331. },
  1332. ],
  1333. },
  1334. state: {},
  1335. preferences: {
  1336. permission: ['admin.security'],
  1337. },
  1338. frontend: false
  1339. )
  1340. Setting.create_if_not_exists(
  1341. title: __('Authentication via %s'),
  1342. name: 'auth_facebook',
  1343. area: 'Security::ThirdPartyAuthentication',
  1344. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1345. options: {
  1346. form: [
  1347. {
  1348. display: '',
  1349. null: true,
  1350. name: 'auth_facebook',
  1351. tag: 'boolean',
  1352. options: {
  1353. true => 'yes',
  1354. false => 'no',
  1355. },
  1356. },
  1357. ],
  1358. },
  1359. preferences: {
  1360. controller: 'SettingsAreaSwitch',
  1361. sub: ['auth_facebook_credentials'],
  1362. title_i18n: [__('Facebook')],
  1363. description_i18n: [__('Facebook'), __('Facebook Developer Site'), 'https://developers.facebook.com/apps/'],
  1364. permission: ['admin.security'],
  1365. },
  1366. state: false,
  1367. frontend: true
  1368. )
  1369. Setting.create_if_not_exists(
  1370. title: __('Facebook App Credentials'),
  1371. name: 'auth_facebook_credentials',
  1372. area: 'Security::ThirdPartyAuthentication::Facebook',
  1373. description: __('App credentials for Facebook.'),
  1374. options: {
  1375. form: [
  1376. {
  1377. display: __('App ID'),
  1378. null: true,
  1379. name: 'app_id',
  1380. tag: 'input',
  1381. },
  1382. {
  1383. display: __('App Secret'),
  1384. null: true,
  1385. name: 'app_secret',
  1386. tag: 'input',
  1387. },
  1388. {
  1389. display: __('Your callback URL'),
  1390. null: true,
  1391. name: 'callback_url',
  1392. tag: 'auth_provider',
  1393. provider: 'auth_facebook',
  1394. },
  1395. ],
  1396. },
  1397. state: {},
  1398. preferences: {
  1399. permission: ['admin.security'],
  1400. },
  1401. frontend: false
  1402. )
  1403. Setting.create_if_not_exists(
  1404. title: __('Authentication via %s'),
  1405. name: 'auth_google_oauth2',
  1406. area: 'Security::ThirdPartyAuthentication',
  1407. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1408. options: {
  1409. form: [
  1410. {
  1411. display: '',
  1412. null: true,
  1413. name: 'auth_google_oauth2',
  1414. tag: 'boolean',
  1415. options: {
  1416. true => 'yes',
  1417. false => 'no',
  1418. },
  1419. },
  1420. ],
  1421. },
  1422. preferences: {
  1423. controller: 'SettingsAreaSwitch',
  1424. sub: ['auth_google_oauth2_credentials'],
  1425. title_i18n: [__('Google')],
  1426. description_i18n: [__('Google'), __('Google API Console Site'), 'https://console.cloud.google.com/apis/credentials'],
  1427. permission: ['admin.security'],
  1428. },
  1429. state: false,
  1430. frontend: true
  1431. )
  1432. Setting.create_if_not_exists(
  1433. title: __('Google App Credentials'),
  1434. name: 'auth_google_oauth2_credentials',
  1435. area: 'Security::ThirdPartyAuthentication::Google',
  1436. description: __('Enables user authentication via Google.'),
  1437. options: {
  1438. form: [
  1439. {
  1440. display: __('Client ID'),
  1441. null: true,
  1442. name: 'client_id',
  1443. tag: 'input',
  1444. },
  1445. {
  1446. display: __('Client Secret'),
  1447. null: true,
  1448. name: 'client_secret',
  1449. tag: 'input',
  1450. },
  1451. {
  1452. display: __('Your callback URL'),
  1453. null: true,
  1454. name: 'callback_url',
  1455. tag: 'auth_provider',
  1456. provider: 'auth_google_oauth2',
  1457. },
  1458. ],
  1459. },
  1460. state: {},
  1461. preferences: {
  1462. permission: ['admin.security'],
  1463. },
  1464. frontend: false
  1465. )
  1466. Setting.create_if_not_exists(
  1467. title: __('Authentication via %s'),
  1468. name: 'auth_linkedin',
  1469. area: 'Security::ThirdPartyAuthentication',
  1470. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1471. options: {
  1472. form: [
  1473. {
  1474. display: '',
  1475. null: true,
  1476. name: 'auth_linkedin',
  1477. tag: 'boolean',
  1478. options: {
  1479. true => 'yes',
  1480. false => 'no',
  1481. },
  1482. },
  1483. ],
  1484. },
  1485. preferences: {
  1486. controller: 'SettingsAreaSwitch',
  1487. sub: ['auth_linkedin_credentials'],
  1488. title_i18n: [__('LinkedIn')],
  1489. description_i18n: [__('LinkedIn'), __('LinkedIn Developer Site'), 'https://www.linkedin.com/developer/apps'],
  1490. permission: ['admin.security'],
  1491. },
  1492. state: false,
  1493. frontend: true
  1494. )
  1495. Setting.create_if_not_exists(
  1496. title: __('LinkedIn App Credentials'),
  1497. name: 'auth_linkedin_credentials',
  1498. area: 'Security::ThirdPartyAuthentication::Linkedin',
  1499. description: __('Enables user authentication via LinkedIn.'),
  1500. options: {
  1501. form: [
  1502. {
  1503. display: __('App ID'),
  1504. null: true,
  1505. name: 'app_id',
  1506. tag: 'input',
  1507. },
  1508. {
  1509. display: __('App Secret'),
  1510. null: true,
  1511. name: 'app_secret',
  1512. tag: 'input',
  1513. },
  1514. {
  1515. display: __('Your callback URL'),
  1516. null: true,
  1517. name: 'callback_url',
  1518. tag: 'auth_provider',
  1519. provider: 'auth_linkedin',
  1520. },
  1521. ],
  1522. },
  1523. state: {},
  1524. preferences: {
  1525. permission: ['admin.security'],
  1526. },
  1527. frontend: false
  1528. )
  1529. Setting.create_if_not_exists(
  1530. title: __('Authentication via %s'),
  1531. name: 'auth_github',
  1532. area: 'Security::ThirdPartyAuthentication',
  1533. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1534. options: {
  1535. form: [
  1536. {
  1537. display: '',
  1538. null: true,
  1539. name: 'auth_github',
  1540. tag: 'boolean',
  1541. options: {
  1542. true => 'yes',
  1543. false => 'no',
  1544. },
  1545. },
  1546. ],
  1547. },
  1548. preferences: {
  1549. controller: 'SettingsAreaSwitch',
  1550. sub: ['auth_github_credentials'],
  1551. title_i18n: [__('GitHub')],
  1552. description_i18n: [__('GitHub'), __('GitHub OAuth Applications'), 'https://github.com/settings/applications'],
  1553. permission: ['admin.security'],
  1554. },
  1555. state: false,
  1556. frontend: true
  1557. )
  1558. Setting.create_if_not_exists(
  1559. title: __('GitHub App Credentials'),
  1560. name: 'auth_github_credentials',
  1561. area: 'Security::ThirdPartyAuthentication::Github',
  1562. description: __('Enables user authentication via GitHub.'),
  1563. options: {
  1564. form: [
  1565. {
  1566. display: __('App ID'),
  1567. null: true,
  1568. name: 'app_id',
  1569. tag: 'input',
  1570. },
  1571. {
  1572. display: __('App Secret'),
  1573. null: true,
  1574. name: 'app_secret',
  1575. tag: 'input',
  1576. },
  1577. {
  1578. display: __('Your callback URL'),
  1579. null: true,
  1580. name: 'callback_url',
  1581. tag: 'auth_provider',
  1582. provider: 'auth_github',
  1583. },
  1584. ],
  1585. },
  1586. state: {},
  1587. preferences: {
  1588. permission: ['admin.security'],
  1589. },
  1590. frontend: false
  1591. )
  1592. Setting.create_if_not_exists(
  1593. title: __('Authentication via %s'),
  1594. name: 'auth_gitlab',
  1595. area: 'Security::ThirdPartyAuthentication',
  1596. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1597. options: {
  1598. form: [
  1599. {
  1600. display: '',
  1601. null: true,
  1602. name: 'auth_gitlab',
  1603. tag: 'boolean',
  1604. options: {
  1605. true => 'yes',
  1606. false => 'no',
  1607. },
  1608. },
  1609. ],
  1610. },
  1611. preferences: {
  1612. controller: 'SettingsAreaSwitch',
  1613. sub: ['auth_gitlab_credentials'],
  1614. title_i18n: [__('GitLab')],
  1615. description_i18n: [__('GitLab'), __('GitLab Applications'), 'https://your-gitlab-host/admin/applications'],
  1616. permission: ['admin.security'],
  1617. },
  1618. state: false,
  1619. frontend: true
  1620. )
  1621. Setting.create_if_not_exists(
  1622. title: __('GitLab App Credentials'),
  1623. name: 'auth_gitlab_credentials',
  1624. area: 'Security::ThirdPartyAuthentication::GitLab',
  1625. description: __('Enables user authentication via GitLab.'),
  1626. options: {
  1627. form: [
  1628. {
  1629. display: __('App ID'),
  1630. null: true,
  1631. name: 'app_id',
  1632. tag: 'input',
  1633. },
  1634. {
  1635. display: __('App Secret'),
  1636. null: true,
  1637. name: 'app_secret',
  1638. tag: 'input',
  1639. },
  1640. {
  1641. display: __('Site'),
  1642. null: true,
  1643. name: 'site',
  1644. tag: 'input',
  1645. placeholder: 'https://gitlab.YOURDOMAIN.com/',
  1646. },
  1647. {
  1648. display: __('Your callback URL'),
  1649. null: true,
  1650. name: 'callback_url',
  1651. tag: 'auth_provider',
  1652. provider: 'auth_gitlab',
  1653. },
  1654. ],
  1655. },
  1656. state: {},
  1657. preferences: {
  1658. permission: ['admin.security'],
  1659. },
  1660. frontend: false
  1661. )
  1662. Setting.create_if_not_exists(
  1663. title: __('Authentication via %s'),
  1664. name: 'auth_microsoft_office365',
  1665. area: 'Security::ThirdPartyAuthentication',
  1666. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1667. options: {
  1668. form: [
  1669. {
  1670. display: '',
  1671. null: true,
  1672. name: 'auth_microsoft_office365',
  1673. tag: 'boolean',
  1674. options: {
  1675. true => 'yes',
  1676. false => 'no',
  1677. },
  1678. },
  1679. ],
  1680. },
  1681. preferences: {
  1682. controller: 'SettingsAreaSwitch',
  1683. sub: ['auth_microsoft_office365_credentials'],
  1684. title_i18n: [__('Microsoft')],
  1685. description_i18n: [__('Microsoft'), __('Microsoft Application Registration Portal'), 'https://portal.azure.com'],
  1686. permission: ['admin.security'],
  1687. },
  1688. state: false,
  1689. frontend: true
  1690. )
  1691. Setting.create_if_not_exists(
  1692. title: __('Microsoft 365 App Credentials'),
  1693. name: 'auth_microsoft_office365_credentials',
  1694. area: 'Security::ThirdPartyAuthentication::Office365',
  1695. description: __('Enables user authentication via Microsoft 365.'),
  1696. options: {
  1697. form: [
  1698. {
  1699. display: __('App ID'),
  1700. null: true,
  1701. name: 'app_id',
  1702. tag: 'input',
  1703. },
  1704. {
  1705. display: __('App Secret'),
  1706. null: true,
  1707. name: 'app_secret',
  1708. tag: 'input',
  1709. },
  1710. {
  1711. display: __('App Tenant ID'),
  1712. null: true,
  1713. name: 'app_tenant',
  1714. tag: 'input',
  1715. placeholder: 'common',
  1716. },
  1717. {
  1718. display: __('Your callback URL'),
  1719. null: true,
  1720. name: 'callback_url',
  1721. tag: 'auth_provider',
  1722. provider: 'auth_microsoft_office365',
  1723. },
  1724. ],
  1725. },
  1726. state: {},
  1727. preferences: {
  1728. permission: ['admin.security'],
  1729. },
  1730. frontend: false
  1731. )
  1732. Setting.create_if_not_exists(
  1733. title: __('Authentication via %s'),
  1734. name: 'auth_weibo',
  1735. area: 'Security::ThirdPartyAuthentication',
  1736. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1737. options: {
  1738. form: [
  1739. {
  1740. display: '',
  1741. null: true,
  1742. name: 'auth_weibo',
  1743. tag: 'boolean',
  1744. options: {
  1745. true => 'yes',
  1746. false => 'no',
  1747. },
  1748. },
  1749. ],
  1750. },
  1751. preferences: {
  1752. controller: 'SettingsAreaSwitch',
  1753. sub: ['auth_weibo_credentials'],
  1754. title_i18n: [__('Weibo')],
  1755. description_i18n: [__('Sina Weibo'), __('Sina Weibo Open Portal'), 'http://open.weibo.com'],
  1756. permission: ['admin.security'],
  1757. },
  1758. state: false,
  1759. frontend: true
  1760. )
  1761. Setting.create_if_not_exists(
  1762. title: __('Weibo App Credentials'),
  1763. name: 'auth_weibo_credentials',
  1764. area: 'Security::ThirdPartyAuthentication::Weibo',
  1765. description: __('Enables user authentication via Weibo.'),
  1766. options: {
  1767. form: [
  1768. {
  1769. display: __('App ID'),
  1770. null: true,
  1771. name: 'client_id',
  1772. tag: 'input',
  1773. },
  1774. {
  1775. display: __('App Secret'),
  1776. null: true,
  1777. name: 'client_secret',
  1778. tag: 'input',
  1779. },
  1780. {
  1781. display: __('Your callback URL'),
  1782. null: true,
  1783. name: 'callback_url',
  1784. tag: 'auth_provider',
  1785. provider: 'auth_weibo',
  1786. },
  1787. ],
  1788. },
  1789. state: {},
  1790. preferences: {
  1791. permission: ['admin.security'],
  1792. },
  1793. frontend: false
  1794. )
  1795. Setting.create_if_not_exists(
  1796. title: __('Authentication via %s'),
  1797. name: 'auth_saml',
  1798. area: 'Security::ThirdPartyAuthentication',
  1799. description: __('Enables user authentication via %s.'),
  1800. options: {
  1801. form: [
  1802. {
  1803. display: '',
  1804. null: true,
  1805. name: 'auth_saml',
  1806. tag: 'boolean',
  1807. options: {
  1808. true => 'yes',
  1809. false => 'no',
  1810. },
  1811. },
  1812. ],
  1813. },
  1814. preferences: {
  1815. controller: 'SettingsAreaSwitch',
  1816. sub: ['auth_saml_credentials'],
  1817. title_i18n: [__('SAML')],
  1818. description_i18n: [__('SAML')],
  1819. permission: ['admin.security'],
  1820. },
  1821. state: false,
  1822. frontend: true
  1823. )
  1824. Setting.create_if_not_exists(
  1825. title: __('SAML App Credentials'),
  1826. name: 'auth_saml_credentials',
  1827. area: 'Security::ThirdPartyAuthentication::SAML',
  1828. description: __('Enables user authentication via SAML.'),
  1829. options: {
  1830. form: [
  1831. {
  1832. display: __('Display name'),
  1833. null: true,
  1834. name: 'display_name',
  1835. tag: 'input',
  1836. placeholder: __('SAML'),
  1837. },
  1838. {
  1839. display: __('IDP SSO target URL'),
  1840. null: true,
  1841. name: 'idp_sso_target_url',
  1842. tag: 'input',
  1843. placeholder: 'https://capriza.github.io/samling/samling.html',
  1844. },
  1845. {
  1846. display: __('IDP Single Logout target URL'),
  1847. null: true,
  1848. name: 'idp_slo_service_url',
  1849. tag: 'input',
  1850. placeholder: 'https://capriza.github.io/samling/slo.html',
  1851. },
  1852. {
  1853. display: __('IDP certificate'),
  1854. null: true,
  1855. name: 'idp_cert',
  1856. tag: 'textarea',
  1857. placeholder: '-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----',
  1858. },
  1859. {
  1860. display: __('IDP certificate fingerprint'),
  1861. null: true,
  1862. name: 'idp_cert_fingerprint',
  1863. tag: 'input',
  1864. placeholder: 'E7:91:B2:E1:...',
  1865. },
  1866. {
  1867. display: __('Name Identifier Format'),
  1868. null: true,
  1869. name: 'name_identifier_format',
  1870. tag: 'input',
  1871. placeholder: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
  1872. },
  1873. {
  1874. display: __('UID Attribute Name'),
  1875. null: true,
  1876. name: 'uid_attribute',
  1877. tag: 'input',
  1878. placeholder: '',
  1879. help: __('Attribute that uniquely identifies the user. If unset, the name identifier returned by the IDP is used.')
  1880. },
  1881. {
  1882. display: __('Your callback URL'),
  1883. null: true,
  1884. name: 'callback_url',
  1885. tag: 'auth_provider',
  1886. provider: 'auth_saml',
  1887. },
  1888. ],
  1889. },
  1890. state: {},
  1891. preferences: {
  1892. permission: ['admin.security'],
  1893. },
  1894. frontend: false
  1895. )
  1896. Setting.create_if_not_exists(
  1897. title: __('Minimum length'),
  1898. name: 'password_min_size',
  1899. area: 'Security::Password',
  1900. description: __('Password needs to have at least a minimal number of characters.'),
  1901. options: {
  1902. form: [
  1903. {
  1904. display: '',
  1905. null: true,
  1906. name: 'password_min_size',
  1907. tag: 'select',
  1908. options: {
  1909. 4 => ' 4',
  1910. 5 => ' 5',
  1911. 6 => ' 6',
  1912. 7 => ' 7',
  1913. 8 => ' 8',
  1914. 9 => ' 9',
  1915. 10 => '10',
  1916. 11 => '11',
  1917. 12 => '12',
  1918. 13 => '13',
  1919. 14 => '14',
  1920. 15 => '15',
  1921. 16 => '16',
  1922. 17 => '17',
  1923. 18 => '18',
  1924. 19 => '19',
  1925. 20 => '20',
  1926. },
  1927. },
  1928. ],
  1929. },
  1930. state: 10,
  1931. preferences: {
  1932. permission: ['admin.security'],
  1933. },
  1934. frontend: false
  1935. )
  1936. Setting.create_if_not_exists(
  1937. title: __('2 lower case and 2 upper case characters'),
  1938. name: 'password_min_2_lower_2_upper_characters',
  1939. area: 'Security::Password',
  1940. description: __('Password needs to contain 2 lower case and 2 upper case characters.'),
  1941. options: {
  1942. form: [
  1943. {
  1944. display: '',
  1945. null: true,
  1946. name: 'password_min_2_lower_2_upper_characters',
  1947. tag: 'select',
  1948. options: {
  1949. 1 => 'yes',
  1950. 0 => 'no',
  1951. },
  1952. translate: true,
  1953. },
  1954. ],
  1955. },
  1956. state: 1,
  1957. preferences: {
  1958. permission: ['admin.security'],
  1959. },
  1960. frontend: false
  1961. )
  1962. Setting.create_if_not_exists(
  1963. title: __('Digit required'),
  1964. name: 'password_need_digit',
  1965. area: 'Security::Password',
  1966. description: __('Password needs to contain at least one digit.'),
  1967. options: {
  1968. form: [
  1969. {
  1970. display: __('Needed'),
  1971. null: true,
  1972. name: 'password_need_digit',
  1973. tag: 'select',
  1974. options: {
  1975. 1 => 'yes',
  1976. 0 => 'no',
  1977. },
  1978. translate: true,
  1979. },
  1980. ],
  1981. },
  1982. state: 1,
  1983. preferences: {
  1984. permission: ['admin.security'],
  1985. },
  1986. frontend: false
  1987. )
  1988. Setting.create_if_not_exists(
  1989. title: __('Special character required'),
  1990. name: 'password_need_special_character',
  1991. area: 'Security::Password',
  1992. description: __('Password needs to contain at least one special character.'),
  1993. options: {
  1994. form: [
  1995. {
  1996. display: __('Needed'),
  1997. null: true,
  1998. name: 'password_need_special_character',
  1999. tag: 'select',
  2000. options: {
  2001. 1 => 'yes',
  2002. 0 => 'no',
  2003. },
  2004. translate: true,
  2005. },
  2006. ],
  2007. },
  2008. state: 0,
  2009. preferences: {
  2010. permission: ['admin.security'],
  2011. },
  2012. frontend: false
  2013. )
  2014. Setting.create_if_not_exists(
  2015. title: __('Maximum failed logins'),
  2016. name: 'password_max_login_failed',
  2017. area: 'Security::Password',
  2018. description: __('Defines after how many failed logins accounts will be deactivated.'),
  2019. options: {
  2020. form: [
  2021. {
  2022. display: '',
  2023. null: true,
  2024. name: 'password_max_login_failed',
  2025. tag: 'select',
  2026. options: {
  2027. 4 => ' 4',
  2028. 5 => ' 5',
  2029. 6 => ' 6',
  2030. 7 => ' 7',
  2031. 8 => ' 8',
  2032. 9 => ' 9',
  2033. 10 => '10',
  2034. 11 => '11',
  2035. 13 => '13',
  2036. 14 => '14',
  2037. 15 => '15',
  2038. 16 => '16',
  2039. 17 => '17',
  2040. 18 => '18',
  2041. 19 => '19',
  2042. 20 => '20',
  2043. },
  2044. },
  2045. ],
  2046. },
  2047. state: 5,
  2048. preferences: {
  2049. authentication: true,
  2050. permission: ['admin.security'],
  2051. },
  2052. frontend: true
  2053. )
  2054. Setting.create_if_not_exists(
  2055. title: __('Ticket Hook'),
  2056. name: 'ticket_hook',
  2057. area: 'Ticket::Base',
  2058. description: __('The identifier for a ticket, e.g. Ticket#, Call#, MyTicket#. The default is Ticket#.'),
  2059. options: {
  2060. form: [
  2061. {
  2062. display: '',
  2063. null: false,
  2064. name: 'ticket_hook',
  2065. tag: 'input',
  2066. },
  2067. ],
  2068. },
  2069. preferences: {
  2070. prio: 1000,
  2071. render: true,
  2072. placeholder: true,
  2073. authentication: true,
  2074. permission: ['admin.ticket'],
  2075. },
  2076. state: 'Ticket#',
  2077. frontend: true
  2078. )
  2079. Setting.create_if_not_exists(
  2080. title: __('Ticket Hook Divider'),
  2081. name: 'ticket_hook_divider',
  2082. area: 'Ticket::Base::Shadow',
  2083. description: __('The divider between TicketHook and ticket number. E. g. \': \'.'),
  2084. options: {
  2085. form: [
  2086. {
  2087. display: '',
  2088. null: true,
  2089. name: 'ticket_hook_divider',
  2090. tag: 'input',
  2091. },
  2092. ],
  2093. },
  2094. state: '',
  2095. preferences: {
  2096. permission: ['admin.ticket'],
  2097. },
  2098. frontend: false
  2099. )
  2100. Setting.create_if_not_exists(
  2101. title: __('Ticket Hook Position'),
  2102. name: 'ticket_hook_position',
  2103. area: 'Ticket::Base',
  2104. description: __("The format of the subject.
  2105. * **Right** means **Some Subject [Ticket#12345]**
  2106. * **Left** means **[Ticket#12345] Some Subject**
  2107. * **None** means **Some Subject** (without ticket number), in which case it recognizes follow-ups based on email headers."),
  2108. options: {
  2109. form: [
  2110. {
  2111. display: '',
  2112. null: true,
  2113. name: 'ticket_hook_position',
  2114. tag: 'select',
  2115. translate: true,
  2116. options: {
  2117. 'left' => __('left'),
  2118. 'right' => __('right'),
  2119. 'none' => __('none'),
  2120. },
  2121. },
  2122. ],
  2123. },
  2124. state: 'right',
  2125. preferences: {
  2126. prio: 2000,
  2127. controller: 'SettingsAreaTicketHookPosition',
  2128. permission: ['admin.ticket'],
  2129. },
  2130. frontend: false
  2131. )
  2132. Setting.create_if_not_exists(
  2133. title: __('Ticket Last Contact Behaviour'),
  2134. name: 'ticket_last_contact_behaviour',
  2135. area: 'Ticket::Base',
  2136. description: __('Defines how the last customer contact time of tickets should be calculated.'),
  2137. options: {
  2138. form: [
  2139. {
  2140. display: '',
  2141. null: true,
  2142. name: 'ticket_last_contact_behaviour',
  2143. tag: 'select',
  2144. translate: true,
  2145. options: {
  2146. 'based_on_customer_reaction' => __('Use the time of the very last customer article.'),
  2147. 'check_if_agent_already_replied' => __('Use the start time of the last customer thread (which may consist of multiple articles).'),
  2148. },
  2149. },
  2150. ],
  2151. },
  2152. state: 'check_if_agent_already_replied',
  2153. preferences: {
  2154. prio: 3000,
  2155. permission: ['admin.ticket'],
  2156. },
  2157. frontend: false
  2158. )
  2159. Setting.create_if_not_exists(
  2160. title: __('Ticket Conditions Expert Mode'),
  2161. name: 'ticket_allow_expert_conditions',
  2162. area: 'Ticket::Core',
  2163. description: __('Defines if the ticket conditions editor supports complex logical expressions.'),
  2164. options: {
  2165. form: [
  2166. {
  2167. display: '',
  2168. null: true,
  2169. name: 'ticket_allow_expert_conditions',
  2170. tag: 'boolean',
  2171. options: {
  2172. true => __('yes'),
  2173. false => __('no'),
  2174. },
  2175. },
  2176. ],
  2177. },
  2178. state: true,
  2179. preferences: {
  2180. online_service_disable: true,
  2181. permission: ['admin.ticket'],
  2182. },
  2183. frontend: true
  2184. )
  2185. Setting.create_if_not_exists(
  2186. title: __('Ticket Number Format'),
  2187. name: 'ticket_number',
  2188. area: 'Ticket::Number',
  2189. description: __("Selects the ticket number generator module.
  2190. * **Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  2191. * 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)."),
  2192. options: {
  2193. form: [
  2194. {
  2195. display: '',
  2196. null: true,
  2197. name: 'ticket_number',
  2198. tag: 'select',
  2199. translate: true,
  2200. options: {
  2201. 'Ticket::Number::Increment' => __('Increment (SystemID.Counter)'),
  2202. 'Ticket::Number::Date' => __('Date (Year.Month.Day.SystemID.Counter)'),
  2203. },
  2204. },
  2205. ],
  2206. },
  2207. state: 'Ticket::Number::Increment',
  2208. preferences: {
  2209. settings_included: %w[ticket_number_increment ticket_number_date],
  2210. controller: 'SettingsAreaTicketNumber',
  2211. permission: ['admin.ticket'],
  2212. },
  2213. frontend: false
  2214. )
  2215. Setting.create_if_not_exists(
  2216. title: __('Ticket Number Increment'),
  2217. name: 'ticket_number_increment',
  2218. area: 'Ticket::Number',
  2219. description: '-',
  2220. options: {
  2221. form: [
  2222. {
  2223. display: __('Checksum'),
  2224. null: true,
  2225. name: 'checksum',
  2226. tag: 'boolean',
  2227. options: {
  2228. true => 'yes',
  2229. false => 'no',
  2230. },
  2231. },
  2232. {
  2233. display: __('Min. size of number'),
  2234. null: true,
  2235. name: 'min_size',
  2236. tag: 'select',
  2237. options: {
  2238. 1 => ' 1',
  2239. 2 => ' 2',
  2240. 3 => ' 3',
  2241. 4 => ' 4',
  2242. 5 => ' 5',
  2243. 6 => ' 6',
  2244. 7 => ' 7',
  2245. 8 => ' 8',
  2246. 9 => ' 9',
  2247. 10 => '10',
  2248. 11 => '11',
  2249. 12 => '12',
  2250. 13 => '13',
  2251. 14 => '14',
  2252. 15 => '15',
  2253. 16 => '16',
  2254. 17 => '17',
  2255. 18 => '18',
  2256. 19 => '19',
  2257. 20 => '20',
  2258. },
  2259. },
  2260. ],
  2261. },
  2262. state: {
  2263. checksum: false,
  2264. min_size: 5,
  2265. },
  2266. preferences: {
  2267. permission: ['admin.ticket'],
  2268. hidden: true,
  2269. },
  2270. frontend: false
  2271. )
  2272. Setting.create_if_not_exists(
  2273. title: __('Ticket Number Increment Date'),
  2274. name: 'ticket_number_date',
  2275. area: 'Ticket::Number',
  2276. description: '-',
  2277. options: {
  2278. form: [
  2279. {
  2280. display: __('Checksum'),
  2281. null: true,
  2282. name: 'checksum',
  2283. tag: 'boolean',
  2284. options: {
  2285. true => 'yes',
  2286. false => 'no',
  2287. },
  2288. },
  2289. ],
  2290. },
  2291. state: {
  2292. checksum: false
  2293. },
  2294. preferences: {
  2295. permission: ['admin.ticket'],
  2296. hidden: true,
  2297. },
  2298. frontend: false
  2299. )
  2300. Setting.create_if_not_exists(
  2301. title: __('Auto Assignment'),
  2302. name: 'ticket_auto_assignment',
  2303. area: 'Web::Base',
  2304. description: __('Enable ticket auto assignment.'),
  2305. options: {
  2306. form: [
  2307. {
  2308. display: '',
  2309. null: true,
  2310. name: 'ticket_auto_assignment',
  2311. tag: 'boolean',
  2312. options: {
  2313. true => 'yes',
  2314. false => 'no',
  2315. },
  2316. },
  2317. ],
  2318. },
  2319. preferences: {
  2320. authentication: true,
  2321. permission: ['admin.ticket_auto_assignment'],
  2322. },
  2323. state: false,
  2324. frontend: true
  2325. )
  2326. Setting.create_if_not_exists(
  2327. title: __('Auto Assignment Selector'),
  2328. name: 'ticket_auto_assignment_selector',
  2329. area: 'Web::Base',
  2330. description: __('Enable auto assignment for following matching tickets.'),
  2331. options: {
  2332. form: [
  2333. {},
  2334. ],
  2335. },
  2336. preferences: {
  2337. authentication: true,
  2338. permission: ['admin.ticket_auto_assignment'],
  2339. },
  2340. state: { condition: { 'ticket.state_id' => { operator: 'is', value: Ticket::State.by_category(:work_on).pluck(:id) } } },
  2341. frontend: true
  2342. )
  2343. Setting.create_or_update(
  2344. title: __('Auto Assignment Ignored Users'),
  2345. name: 'ticket_auto_assignment_user_ids_ignore',
  2346. area: 'Web::Base',
  2347. description: __('Define an exception of "automatic assignment" for certain users (e.g. executives).'),
  2348. options: {
  2349. form: [
  2350. {},
  2351. ],
  2352. },
  2353. preferences: {
  2354. authentication: true,
  2355. permission: ['admin.ticket_auto_assignment'],
  2356. },
  2357. state: [],
  2358. frontend: true
  2359. )
  2360. Setting.create_or_update(
  2361. title: __('Default Ticket Agent Notifications'),
  2362. name: 'ticket_agent_default_notifications',
  2363. area: 'Ticket::Core',
  2364. description: __('Define the default agent notifications for new users.'),
  2365. options: {
  2366. form: [
  2367. {},
  2368. ],
  2369. },
  2370. preferences: {
  2371. authentication: true,
  2372. permission: ['admin.ticket'],
  2373. },
  2374. state: {
  2375. create: {
  2376. criteria: {
  2377. owned_by_me: true,
  2378. owned_by_nobody: true,
  2379. subscribed: true,
  2380. no: false,
  2381. },
  2382. channel: {
  2383. email: true,
  2384. online: true,
  2385. }
  2386. },
  2387. update: {
  2388. criteria: {
  2389. owned_by_me: true,
  2390. owned_by_nobody: true,
  2391. subscribed: true,
  2392. no: false,
  2393. },
  2394. channel: {
  2395. email: true,
  2396. online: true,
  2397. }
  2398. },
  2399. reminder_reached: {
  2400. criteria: {
  2401. owned_by_me: true,
  2402. owned_by_nobody: false,
  2403. subscribed: false,
  2404. no: false,
  2405. },
  2406. channel: {
  2407. email: true,
  2408. online: true,
  2409. }
  2410. },
  2411. escalation: {
  2412. criteria: {
  2413. owned_by_me: true,
  2414. owned_by_nobody: false,
  2415. subscribed: false,
  2416. no: false,
  2417. },
  2418. channel: {
  2419. email: true,
  2420. online: true,
  2421. }
  2422. }
  2423. },
  2424. frontend: true
  2425. )
  2426. Setting.create_if_not_exists(
  2427. title: __('Detect Duplicate Ticket Creation'),
  2428. name: 'ticket_duplicate_detection',
  2429. area: 'Web::TicketDuplicateDetection',
  2430. description: __('Enables a warning to users during ticket creation if there is an existing ticket with the same attributes.'),
  2431. options: {
  2432. form: [
  2433. {
  2434. display: '',
  2435. null: true,
  2436. name: 'ticket_duplicate_detection',
  2437. tag: 'boolean',
  2438. options: {
  2439. true => 'yes',
  2440. false => 'no',
  2441. },
  2442. },
  2443. ],
  2444. },
  2445. preferences: {
  2446. authentication: true,
  2447. permission: ['admin.ticket_duplicate_detection'],
  2448. },
  2449. state: false,
  2450. frontend: true
  2451. )
  2452. Setting.create_if_not_exists(
  2453. title: __('Attributes to compare'),
  2454. name: 'ticket_duplicate_detection_attributes',
  2455. area: 'Web::TicketDuplicateDetection',
  2456. description: __('Defines which ticket attributes are checked before creating a ticket.'),
  2457. options: {
  2458. form: [
  2459. {},
  2460. ],
  2461. },
  2462. preferences: {
  2463. authentication: true,
  2464. permission: ['admin.ticket_duplicate_detection'],
  2465. },
  2466. state: [],
  2467. frontend: true
  2468. )
  2469. Setting.create_if_not_exists(
  2470. title: __('Warning title'),
  2471. name: 'ticket_duplicate_detection_title',
  2472. area: 'Web::TicketDuplicateDetection',
  2473. description: __('Defines the warning title that is shown when a matching ticket is present.'),
  2474. options: {
  2475. form: [
  2476. {},
  2477. ],
  2478. },
  2479. preferences: {
  2480. authentication: true,
  2481. permission: ['admin.ticket_duplicate_detection'],
  2482. },
  2483. state: __('Similar tickets found'),
  2484. frontend: true
  2485. )
  2486. Setting.create_if_not_exists(
  2487. title: __('Warning message'),
  2488. name: 'ticket_duplicate_detection_body',
  2489. area: 'Web::TicketDuplicateDetection',
  2490. description: __('Defines the warning message that is shown when a matching ticket is present.'),
  2491. options: {
  2492. form: [
  2493. {},
  2494. ],
  2495. },
  2496. preferences: {
  2497. authentication: true,
  2498. permission: ['admin.ticket_duplicate_detection'],
  2499. },
  2500. state: __('Tickets with the same attributes were found.'),
  2501. frontend: true
  2502. )
  2503. Setting.create_if_not_exists(
  2504. title: __('Show to user roles'),
  2505. name: 'ticket_duplicate_detection_role_ids',
  2506. area: 'Web::TicketDuplicateDetection',
  2507. description: __('Defines which user roles will receive a warning in case of matching tickets.'),
  2508. options: {
  2509. form: [
  2510. {},
  2511. ],
  2512. },
  2513. preferences: {
  2514. authentication: true,
  2515. permission: ['admin.ticket_duplicate_detection'],
  2516. },
  2517. state: [2],
  2518. frontend: true
  2519. )
  2520. Setting.create_if_not_exists(
  2521. title: __('Show matching tickets in the warning'),
  2522. name: 'ticket_duplicate_detection_show_tickets',
  2523. area: 'Web::TicketDuplicateDetection',
  2524. description: __('Defines whether the matching tickets are shown in case of already existing tickets.'),
  2525. options: {
  2526. form: [
  2527. {},
  2528. ],
  2529. },
  2530. preferences: {
  2531. authentication: true,
  2532. permission: ['admin.ticket_duplicate_detection'],
  2533. },
  2534. state: true,
  2535. frontend: true
  2536. )
  2537. Setting.create_if_not_exists(
  2538. title: __('Permission level for looking up tickets'),
  2539. name: 'ticket_duplicate_detection_permission_level',
  2540. area: 'Web::TicketDuplicateDetection',
  2541. description: __('Defines the permission level used for lookups.'),
  2542. options: {
  2543. form: [
  2544. {},
  2545. ],
  2546. },
  2547. preferences: {
  2548. authentication: true,
  2549. permission: ['admin.ticket_duplicate_detection'],
  2550. },
  2551. state: 'user',
  2552. frontend: true
  2553. )
  2554. Setting.create_if_not_exists(
  2555. title: __('Match tickets in following states'),
  2556. name: 'ticket_duplicate_detection_search',
  2557. area: 'Web::TicketDuplicateDetection',
  2558. description: __('Defines the ticket states used for lookups.'),
  2559. options: {
  2560. form: [
  2561. {},
  2562. ],
  2563. },
  2564. state: 'all',
  2565. preferences: {
  2566. authentication: true,
  2567. permission: ['admin.ticket_duplicate_detection']
  2568. },
  2569. frontend: true
  2570. )
  2571. Setting.create_if_not_exists(
  2572. title: __('Ticket Number ignore system_id'),
  2573. name: 'ticket_number_ignore_system_id',
  2574. area: 'Ticket::Core',
  2575. description: '-',
  2576. options: {
  2577. form: [
  2578. {
  2579. display: __('Ignore system_id'),
  2580. null: true,
  2581. name: 'ticket_number_ignore_system_id',
  2582. tag: 'boolean',
  2583. options: {
  2584. true => 'yes',
  2585. false => 'no',
  2586. },
  2587. },
  2588. ],
  2589. },
  2590. state: false,
  2591. preferences: {
  2592. permission: ['admin.ticket'],
  2593. hidden: true,
  2594. },
  2595. frontend: false
  2596. )
  2597. Setting.create_if_not_exists(
  2598. title: __('Recursive Ticket Triggers'),
  2599. name: 'ticket_trigger_recursive',
  2600. area: 'Ticket::Core',
  2601. description: __('Activate the recursive processing of ticket triggers.'),
  2602. options: {
  2603. form: [
  2604. {
  2605. display: __('Recursive Ticket Triggers'),
  2606. null: true,
  2607. name: 'ticket_trigger_recursive',
  2608. tag: 'boolean',
  2609. options: {
  2610. true => 'yes',
  2611. false => 'no',
  2612. },
  2613. },
  2614. ],
  2615. },
  2616. state: false,
  2617. preferences: {
  2618. permission: ['admin.ticket'],
  2619. hidden: true,
  2620. },
  2621. frontend: false
  2622. )
  2623. Setting.create_if_not_exists(
  2624. title: __('Recursive Ticket Triggers Loop Max.'),
  2625. name: 'ticket_trigger_recursive_max_loop',
  2626. area: 'Ticket::Core',
  2627. description: __('Maximum number of recursively executed triggers.'),
  2628. options: {
  2629. form: [
  2630. {
  2631. display: __('Recursive Ticket Triggers'),
  2632. null: true,
  2633. name: 'ticket_trigger_recursive_max_loop',
  2634. tag: 'select',
  2635. options: {
  2636. 1 => ' 1',
  2637. 2 => ' 2',
  2638. 3 => ' 3',
  2639. 4 => ' 4',
  2640. 5 => ' 5',
  2641. 6 => ' 6',
  2642. 7 => ' 7',
  2643. 8 => ' 8',
  2644. 9 => ' 9',
  2645. 10 => '10',
  2646. 11 => '11',
  2647. 12 => '12',
  2648. 13 => '13',
  2649. 14 => '14',
  2650. 15 => '15',
  2651. 16 => '16',
  2652. 17 => '17',
  2653. 18 => '18',
  2654. 19 => '19',
  2655. 20 => '20',
  2656. },
  2657. },
  2658. ],
  2659. },
  2660. state: 10,
  2661. preferences: {
  2662. permission: ['admin.ticket'],
  2663. hidden: true,
  2664. },
  2665. frontend: false
  2666. )
  2667. Setting.create_if_not_exists(
  2668. title: __('Enable Ticket creation'),
  2669. name: 'customer_ticket_create',
  2670. area: 'CustomerWeb::Base',
  2671. description: __('Defines if a customer can create tickets via the web interface.'),
  2672. options: {
  2673. form: [
  2674. {
  2675. display: '',
  2676. null: true,
  2677. name: 'customer_ticket_create',
  2678. tag: 'boolean',
  2679. options: {
  2680. true => 'yes',
  2681. false => 'no',
  2682. },
  2683. },
  2684. ],
  2685. },
  2686. state: true,
  2687. preferences: {
  2688. authentication: true,
  2689. permission: ['admin.channel_web'],
  2690. },
  2691. frontend: true
  2692. )
  2693. Setting.create_if_not_exists(
  2694. title: __('Group selection for Ticket creation'),
  2695. name: 'customer_ticket_create_group_ids',
  2696. area: 'CustomerWeb::Base',
  2697. description: __('Defines groups for which a customer can create tickets via web interface. No selection means all groups are available.'),
  2698. options: {
  2699. form: [
  2700. {
  2701. display: '',
  2702. null: true,
  2703. name: 'group_ids',
  2704. tag: 'multiselect',
  2705. multiple: true,
  2706. relation: 'Group',
  2707. },
  2708. ],
  2709. },
  2710. state: nil,
  2711. preferences: {
  2712. authentication: true,
  2713. permission: ['admin.channel_web'],
  2714. },
  2715. frontend: true
  2716. )
  2717. Setting.create_if_not_exists(
  2718. title: __('Tab behaviour after ticket action'),
  2719. name: 'ticket_secondary_action',
  2720. area: 'CustomerWeb::Base',
  2721. description: __('Defines the tab behaviour after a ticket action.'),
  2722. options: {
  2723. form: [
  2724. {
  2725. display: '',
  2726. null: true,
  2727. name: 'ticket_secondary_action',
  2728. tag: 'boolean',
  2729. options: {
  2730. 'closeTab' => __('Close tab'),
  2731. 'closeTabOnTicketClose' => __('Close tab on ticket close'),
  2732. 'closeNextInOverview' => __('Next in overview'),
  2733. 'stayOnTab' => __('Stay on tab'),
  2734. },
  2735. },
  2736. ],
  2737. },
  2738. state: 'stayOnTab',
  2739. preferences: {
  2740. authentication: true,
  2741. permission: ['admin.channel_web'],
  2742. },
  2743. frontend: true
  2744. )
  2745. Setting.create_if_not_exists(
  2746. title: __('Enable Ticket creation'),
  2747. name: 'form_ticket_create',
  2748. area: 'Form::Base',
  2749. description: __('Defines if tickets can be created via web form.'),
  2750. options: {
  2751. form: [
  2752. {
  2753. display: '',
  2754. null: true,
  2755. name: 'form_ticket_create',
  2756. tag: 'boolean',
  2757. options: {
  2758. true => 'yes',
  2759. false => 'no',
  2760. },
  2761. },
  2762. ],
  2763. },
  2764. state: false,
  2765. preferences: {
  2766. permission: ['admin.channel_formular'],
  2767. },
  2768. frontend: false,
  2769. )
  2770. group = Group.where(active: true).first
  2771. if !group
  2772. group = Group.first
  2773. end
  2774. group_id = 1
  2775. if group
  2776. group_id = group.id
  2777. end
  2778. Setting.create_if_not_exists(
  2779. title: __('Group selection for ticket creation'),
  2780. name: 'form_ticket_create_group_id',
  2781. area: 'Form::Base',
  2782. description: __('Defines the group of tickets created via web form.'),
  2783. options: {
  2784. form: [
  2785. {
  2786. display: '',
  2787. null: true,
  2788. name: 'form_ticket_create_group_id',
  2789. tag: 'select',
  2790. relation: 'Group',
  2791. },
  2792. ],
  2793. },
  2794. state: group_id,
  2795. preferences: {
  2796. permission: ['admin.channel_formular'],
  2797. },
  2798. frontend: false,
  2799. )
  2800. Setting.create_if_not_exists(
  2801. title: __('Limit tickets by IP per hour'),
  2802. name: 'form_ticket_create_by_ip_per_hour',
  2803. area: 'Form::Base',
  2804. description: __('Defines a limit for how many tickets can be created via web form from one IP address per hour.'),
  2805. options: {
  2806. form: [
  2807. {
  2808. display: '',
  2809. null: true,
  2810. name: 'form_ticket_create_by_ip_per_hour',
  2811. tag: 'input',
  2812. },
  2813. ],
  2814. },
  2815. state: 20,
  2816. preferences: {
  2817. permission: ['admin.channel_formular'],
  2818. },
  2819. frontend: false,
  2820. )
  2821. Setting.create_if_not_exists(
  2822. title: __('Limit tickets by IP per day'),
  2823. name: 'form_ticket_create_by_ip_per_day',
  2824. area: 'Form::Base',
  2825. description: __('Defines a limit for how many tickets can be created via web form from one IP address per day.'),
  2826. options: {
  2827. form: [
  2828. {
  2829. display: '',
  2830. null: true,
  2831. name: 'form_ticket_create_by_ip_per_day',
  2832. tag: 'input',
  2833. },
  2834. ],
  2835. },
  2836. state: 240,
  2837. preferences: {
  2838. permission: ['admin.channel_formular'],
  2839. },
  2840. frontend: false,
  2841. )
  2842. Setting.create_if_not_exists(
  2843. title: __('Limit tickets per day'),
  2844. name: 'form_ticket_create_per_day',
  2845. area: 'Form::Base',
  2846. description: __('Defines a limit for how many tickets can be created via web form per day.'),
  2847. options: {
  2848. form: [
  2849. {
  2850. display: '',
  2851. null: true,
  2852. name: 'form_ticket_create_per_day',
  2853. tag: 'input',
  2854. },
  2855. ],
  2856. },
  2857. state: 5000,
  2858. preferences: {
  2859. permission: ['admin.channel_formular'],
  2860. },
  2861. frontend: false,
  2862. )
  2863. Setting.create_if_not_exists(
  2864. title: __('Ticket Subject Size'),
  2865. name: 'ticket_subject_size',
  2866. area: 'Email::Base',
  2867. description: __('Max. length of the subject in an email reply.'),
  2868. options: {
  2869. form: [
  2870. {
  2871. display: '',
  2872. null: false,
  2873. name: 'ticket_subject_size',
  2874. tag: 'input',
  2875. },
  2876. ],
  2877. },
  2878. state: '110',
  2879. preferences: {
  2880. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2881. },
  2882. frontend: false
  2883. )
  2884. Setting.create_if_not_exists(
  2885. title: __('Ticket Subject Reply'),
  2886. name: 'ticket_subject_re',
  2887. area: 'Email::Base',
  2888. description: __('The text at the beginning of the subject in an email reply, e.g. RE, AW, or AS.'),
  2889. options: {
  2890. form: [
  2891. {
  2892. display: '',
  2893. null: true,
  2894. name: 'ticket_subject_re',
  2895. tag: 'input',
  2896. },
  2897. ],
  2898. },
  2899. state: 'RE',
  2900. preferences: {
  2901. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2902. },
  2903. frontend: false
  2904. )
  2905. Setting.create_if_not_exists(
  2906. title: __('Ticket Subject Forward'),
  2907. name: 'ticket_subject_fwd',
  2908. area: 'Email::Base',
  2909. description: __('The text at the beginning of the subject in an email forward, e. g. FWD.'),
  2910. options: {
  2911. form: [
  2912. {
  2913. display: '',
  2914. null: true,
  2915. name: 'ticket_subject_fwd',
  2916. tag: 'input',
  2917. },
  2918. ],
  2919. },
  2920. state: 'FWD',
  2921. preferences: {
  2922. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2923. },
  2924. frontend: false
  2925. )
  2926. Setting.create_if_not_exists(
  2927. title: __('Sender Format'),
  2928. name: 'ticket_define_email_from',
  2929. area: 'Email::Base',
  2930. description: __('Defines how the From field of emails (sent from answers and email tickets) should look like.'),
  2931. options: {
  2932. form: [
  2933. {
  2934. display: '',
  2935. null: true,
  2936. name: 'ticket_define_email_from',
  2937. tag: 'select',
  2938. options: {
  2939. SystemAddressName: __('System Address Display Name'),
  2940. AgentNameSystemAddressName: __('Agent Name + FromSeparator + System Address Display Name'),
  2941. AgentName: __('Agent Name'),
  2942. },
  2943. translate: true,
  2944. },
  2945. ],
  2946. },
  2947. state: 'AgentNameSystemAddressName',
  2948. preferences: {
  2949. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2950. },
  2951. frontend: false
  2952. )
  2953. Setting.create_if_not_exists(
  2954. title: __('Sender Format Separator'),
  2955. name: 'ticket_define_email_from_separator',
  2956. area: 'Email::Base',
  2957. description: __('Defines the separator between the agent\'s real name and the given group email address.'),
  2958. options: {
  2959. form: [
  2960. {
  2961. display: '',
  2962. null: false,
  2963. name: 'ticket_define_email_from_separator',
  2964. tag: 'input',
  2965. },
  2966. ],
  2967. },
  2968. state: 'via',
  2969. preferences: {
  2970. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2971. },
  2972. frontend: false
  2973. )
  2974. Setting.create_if_not_exists(
  2975. title: __('Maximum Email Size'),
  2976. name: 'postmaster_max_size',
  2977. area: 'Email::Base',
  2978. description: __('Defines the maximum accepted email size in MB.'),
  2979. options: {
  2980. form: [
  2981. {
  2982. display: '',
  2983. null: true,
  2984. name: 'postmaster_max_size',
  2985. tag: 'select',
  2986. options: {
  2987. 1 => ' 1',
  2988. 2 => ' 2',
  2989. 3 => ' 3',
  2990. 4 => ' 4',
  2991. 5 => ' 5',
  2992. 6 => ' 6',
  2993. 7 => ' 7',
  2994. 8 => ' 8',
  2995. 9 => ' 9',
  2996. 10 => ' 10',
  2997. 15 => ' 15',
  2998. 20 => ' 20',
  2999. 25 => ' 25',
  3000. 30 => ' 30',
  3001. 35 => ' 35',
  3002. 40 => ' 40',
  3003. 45 => ' 45',
  3004. 50 => ' 50',
  3005. 60 => ' 60',
  3006. 70 => ' 70',
  3007. 80 => ' 80',
  3008. 90 => ' 90',
  3009. 100 => '100',
  3010. 125 => '125',
  3011. 150 => '150',
  3012. },
  3013. },
  3014. ],
  3015. },
  3016. state: 10,
  3017. preferences: {
  3018. online_service_disable: true,
  3019. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3020. },
  3021. frontend: false
  3022. )
  3023. Setting.create_if_not_exists(
  3024. title: __('Additional follow-up detection'),
  3025. name: 'postmaster_follow_up_search_in',
  3026. area: 'Email::Base',
  3027. description: __('By default, the follow-up check is done via the subject of an email. This setting lets you add more fields for which the follow-up check will be executed.'),
  3028. options: {
  3029. form: [
  3030. {
  3031. display: '',
  3032. null: true,
  3033. name: 'postmaster_follow_up_search_in',
  3034. tag: 'checkbox',
  3035. options: {
  3036. 'references' => __('References - Search for follow-up also in In-Reply-To or References headers.'),
  3037. 'body' => __('Body - Search for follow-up also in mail body.'),
  3038. 'attachment' => __('Attachment - Search for follow-up also in attachments.'),
  3039. },
  3040. translate: true,
  3041. },
  3042. ],
  3043. },
  3044. state: [],
  3045. preferences: {
  3046. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3047. },
  3048. frontend: false
  3049. )
  3050. Setting.create_if_not_exists(
  3051. title: __('Sender based on Reply-To header'),
  3052. name: 'postmaster_sender_based_on_reply_to',
  3053. area: 'Email::Base',
  3054. 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.'),
  3055. options: {
  3056. form: [
  3057. {
  3058. display: '',
  3059. null: true,
  3060. name: 'postmaster_sender_based_on_reply_to',
  3061. tag: 'select',
  3062. options: {
  3063. '' => '-',
  3064. 'as_sender_of_email' => __('Take Reply-To header as sender/from of email.'),
  3065. 'as_sender_of_email_use_from_realname' => __('Take Reply-To header as sender/from of email and use the real name of origin from.'),
  3066. },
  3067. translate: true,
  3068. },
  3069. ],
  3070. },
  3071. state: [],
  3072. preferences: {
  3073. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3074. },
  3075. frontend: false
  3076. )
  3077. Setting.create_if_not_exists(
  3078. title: __('Customer selection based on sender and receiver list'),
  3079. name: 'postmaster_sender_is_agent_search_for_customer',
  3080. area: 'Email::Base',
  3081. description: __('If the sender is an agent, set the first user in the recipient list as the customer.'),
  3082. options: {
  3083. form: [
  3084. {
  3085. display: '',
  3086. null: true,
  3087. name: 'postmaster_sender_is_agent_search_for_customer',
  3088. tag: 'boolean',
  3089. options: {
  3090. true => 'yes',
  3091. false => 'no',
  3092. },
  3093. },
  3094. ],
  3095. },
  3096. state: true,
  3097. preferences: {
  3098. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3099. },
  3100. frontend: false
  3101. )
  3102. Setting.create_if_not_exists(
  3103. title: __('Send postmaster mail if mail too large'),
  3104. name: 'postmaster_send_reject_if_mail_too_large',
  3105. area: 'Email::Base',
  3106. description: __('Send postmaster reject mail to sender of mail if mail is too large.'),
  3107. options: {
  3108. form: [
  3109. {
  3110. display: '',
  3111. null: true,
  3112. name: 'postmaster_send_reject_if_mail_too_large',
  3113. tag: 'boolean',
  3114. options: {
  3115. true => 'yes',
  3116. false => 'no',
  3117. },
  3118. },
  3119. ],
  3120. },
  3121. state: true,
  3122. preferences: {
  3123. online_service_disable: true,
  3124. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3125. },
  3126. frontend: false
  3127. )
  3128. Setting.create_if_not_exists(
  3129. title: __('Notification Sender'),
  3130. name: 'notification_sender',
  3131. area: 'Email::Base',
  3132. description: __('Defines the sender of email notifications.'),
  3133. options: {
  3134. form: [
  3135. {
  3136. display: '',
  3137. null: false,
  3138. name: 'notification_sender',
  3139. tag: 'input',
  3140. },
  3141. ],
  3142. },
  3143. state: '#{config.product_name} <noreply@#{config.fqdn}>', # rubocop:disable Lint/InterpolationCheck
  3144. preferences: {
  3145. online_service_disable: true,
  3146. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3147. },
  3148. frontend: false
  3149. )
  3150. Setting.create_if_not_exists(
  3151. title: __('Block Notifications'),
  3152. name: 'send_no_auto_response_reg_exp',
  3153. area: 'Email::Base',
  3154. description: __('If this regex matches, no notification will be sent by the sender.'),
  3155. options: {
  3156. form: [
  3157. {
  3158. display: '',
  3159. null: false,
  3160. name: 'send_no_auto_response_reg_exp',
  3161. tag: 'input',
  3162. },
  3163. ],
  3164. },
  3165. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?',
  3166. preferences: {
  3167. online_service_disable: true,
  3168. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  3169. },
  3170. frontend: false
  3171. )
  3172. Setting.create_if_not_exists(
  3173. title: __('BCC address for all outgoing emails'),
  3174. name: 'system_bcc',
  3175. area: 'Email::Enhanced',
  3176. description: __('To archive all outgoing emails from Zammad to external, you can store a BCC email address here.'),
  3177. options: {},
  3178. state: '',
  3179. preferences: { online_service_disable: true },
  3180. frontend: false
  3181. )
  3182. Setting.create_if_not_exists(
  3183. title: __('API Token Access'),
  3184. name: 'api_token_access',
  3185. area: 'API::Base',
  3186. description: __('Enable REST API using tokens (not username/email address and password). Each user needs to create its own access tokens in user profile.'),
  3187. options: {
  3188. form: [
  3189. {
  3190. display: '',
  3191. null: true,
  3192. name: 'api_token_access',
  3193. tag: 'boolean',
  3194. options: {
  3195. true => 'yes',
  3196. false => 'no',
  3197. },
  3198. },
  3199. ],
  3200. },
  3201. state: true,
  3202. preferences: {
  3203. permission: ['admin.api'],
  3204. },
  3205. frontend: true
  3206. )
  3207. Setting.create_if_not_exists(
  3208. title: __('API Password Access'),
  3209. name: 'api_password_access',
  3210. area: 'API::Base',
  3211. description: __('Enable REST API access using the username/email address and password for the authentication user.'),
  3212. options: {
  3213. form: [
  3214. {
  3215. display: '',
  3216. null: true,
  3217. name: 'api_password_access',
  3218. tag: 'boolean',
  3219. options: {
  3220. true => 'yes',
  3221. false => 'no',
  3222. },
  3223. },
  3224. ],
  3225. },
  3226. state: true,
  3227. preferences: {
  3228. permission: ['admin.api'],
  3229. },
  3230. frontend: false
  3231. )
  3232. Setting.create_if_not_exists(
  3233. title: __('Monitoring Token'),
  3234. name: 'monitoring_token',
  3235. area: 'HealthCheck::Base',
  3236. description: __('Token for monitoring.'),
  3237. options: {
  3238. form: [
  3239. {
  3240. display: '',
  3241. null: false,
  3242. name: 'monitoring_token',
  3243. tag: 'input',
  3244. },
  3245. ],
  3246. },
  3247. state: ENV['MONITORING_TOKEN'] || SecureRandom.urlsafe_base64(40),
  3248. preferences: {
  3249. permission: ['admin.monitoring'],
  3250. },
  3251. frontend: false
  3252. )
  3253. Setting.create_if_not_exists(
  3254. title: __('Enable Chat'),
  3255. name: 'chat',
  3256. area: 'Chat::Base',
  3257. description: __('Enable/disable online chat.'),
  3258. options: {
  3259. form: [
  3260. {
  3261. display: '',
  3262. null: true,
  3263. name: 'chat',
  3264. tag: 'boolean',
  3265. options: {
  3266. true => 'yes',
  3267. false => 'no',
  3268. },
  3269. },
  3270. ],
  3271. },
  3272. preferences: {
  3273. trigger: ['menu:render', 'chat:rerender'],
  3274. permission: ['admin.channel_chat'],
  3275. },
  3276. state: false,
  3277. frontend: true
  3278. )
  3279. Setting.create_if_not_exists(
  3280. title: __('Agent idle timeout'),
  3281. name: 'chat_agent_idle_timeout',
  3282. area: 'Chat::Extended',
  3283. description: __('Idle timeout in seconds until agent is set offline automatically.'),
  3284. options: {
  3285. form: [
  3286. {
  3287. display: '',
  3288. null: false,
  3289. name: 'chat_agent_idle_timeout',
  3290. tag: 'input',
  3291. },
  3292. ],
  3293. },
  3294. state: '120',
  3295. preferences: {
  3296. permission: ['admin.channel_chat'],
  3297. },
  3298. frontend: true
  3299. )
  3300. Setting.create_if_not_exists(
  3301. title: __('Defines searchable models.'),
  3302. name: 'models_searchable',
  3303. area: 'Models::Base',
  3304. description: __('Defines the searchable models.'),
  3305. options: {},
  3306. state: Models.searchable.map(&:to_s),
  3307. preferences: {
  3308. authentication: true,
  3309. },
  3310. frontend: true,
  3311. )
  3312. Setting.create_if_not_exists(
  3313. title: __('Default Screen'),
  3314. name: 'default_controller',
  3315. area: 'Core',
  3316. description: __('Defines the default screen.'),
  3317. options: {},
  3318. state: '#dashboard',
  3319. frontend: true
  3320. )
  3321. Setting.create_if_not_exists(
  3322. title: __('Elasticsearch Endpoint URL'),
  3323. name: 'es_url',
  3324. area: 'SearchIndex::Elasticsearch',
  3325. description: __('Defines endpoint of Elasticsearch.'),
  3326. state: '',
  3327. preferences: { online_service_disable: true },
  3328. frontend: false
  3329. )
  3330. Setting.create_if_not_exists(
  3331. title: __('Elasticsearch Endpoint User'),
  3332. name: 'es_user',
  3333. area: 'SearchIndex::Elasticsearch',
  3334. description: __('Defines HTTP basic auth user of Elasticsearch.'),
  3335. state: '',
  3336. preferences: { online_service_disable: true },
  3337. frontend: false
  3338. )
  3339. Setting.create_if_not_exists(
  3340. title: __('Elasticsearch Endpoint Password'),
  3341. name: 'es_password',
  3342. area: 'SearchIndex::Elasticsearch',
  3343. description: __('Defines HTTP basic auth password of Elasticsearch.'),
  3344. state: '',
  3345. preferences: { online_service_disable: true },
  3346. frontend: false
  3347. )
  3348. Setting.create_if_not_exists(
  3349. title: __('Elasticsearch Endpoint Index'),
  3350. name: 'es_index',
  3351. area: 'SearchIndex::Elasticsearch',
  3352. description: __('Defines Elasticsearch index name.'),
  3353. state: 'zammad',
  3354. preferences: { online_service_disable: true },
  3355. frontend: false
  3356. )
  3357. Setting.create_if_not_exists(
  3358. title: __('Elasticsearch Attachment Extensions'),
  3359. name: 'es_attachment_ignore',
  3360. area: 'SearchIndex::Elasticsearch',
  3361. description: __('Defines attachment extensions which will be ignored by Elasticsearch.'),
  3362. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  3363. preferences: { online_service_disable: true },
  3364. frontend: false
  3365. )
  3366. Setting.create_if_not_exists(
  3367. title: __('Elasticsearch Attachment Size'),
  3368. name: 'es_attachment_max_size_in_mb',
  3369. area: 'SearchIndex::Elasticsearch',
  3370. description: __('Define max. attachment size for Elasticsearch.'),
  3371. state: 10,
  3372. preferences: { online_service_disable: true },
  3373. frontend: false
  3374. )
  3375. Setting.create_if_not_exists(
  3376. title: __('Elasticsearch Total Payload Size'),
  3377. name: 'es_total_max_size_in_mb',
  3378. area: 'SearchIndex::Elasticsearch',
  3379. description: __('Define max. payload size for Elasticsearch.'),
  3380. state: 300,
  3381. preferences: { online_service_disable: true },
  3382. frontend: false
  3383. )
  3384. Setting.create_if_not_exists(
  3385. title: __('Elasticsearch Pipeline Name'),
  3386. name: 'es_pipeline',
  3387. area: 'SearchIndex::Elasticsearch',
  3388. description: __('Define pipeline name for Elasticsearch.'),
  3389. state: '',
  3390. preferences: { online_service_disable: true },
  3391. frontend: false
  3392. )
  3393. Setting.create_if_not_exists(
  3394. title: __('Import Mode'),
  3395. name: 'import_mode',
  3396. area: 'Import::Base',
  3397. description: __('Puts Zammad into import mode (disables some triggers).'),
  3398. options: {
  3399. form: [
  3400. {
  3401. display: '',
  3402. null: true,
  3403. name: 'import_mode',
  3404. tag: 'boolean',
  3405. options: {
  3406. true => 'yes',
  3407. false => 'no',
  3408. },
  3409. },
  3410. ],
  3411. },
  3412. state: false,
  3413. frontend: true
  3414. )
  3415. Setting.create_if_not_exists(
  3416. title: __('Import Backend'),
  3417. name: 'import_backend',
  3418. area: 'Import::Base::Internal',
  3419. description: __('Set backend which is being used for import.'),
  3420. options: {},
  3421. state: '',
  3422. frontend: true
  3423. )
  3424. Setting.create_if_not_exists(
  3425. title: __('Ignore Escalation/SLA Information'),
  3426. name: 'import_ignore_sla',
  3427. area: 'Import::Base',
  3428. description: __('Ignore escalation/SLA information for import.'),
  3429. options: {
  3430. form: [
  3431. {
  3432. display: '',
  3433. null: true,
  3434. name: 'import_ignore_sla',
  3435. tag: 'boolean',
  3436. options: {
  3437. true => 'yes',
  3438. false => 'no',
  3439. },
  3440. },
  3441. ],
  3442. },
  3443. state: false,
  3444. frontend: false
  3445. )
  3446. Setting.create_if_not_exists(
  3447. title: __('Import Endpoint'),
  3448. name: 'import_otrs_endpoint',
  3449. area: 'Import::OTRS',
  3450. description: __('Defines an OTRS endpoint to import users, tickets, states, and articles.'),
  3451. options: {
  3452. form: [
  3453. {
  3454. display: '',
  3455. null: false,
  3456. name: 'import_otrs_endpoint',
  3457. tag: 'input',
  3458. },
  3459. ],
  3460. },
  3461. state: 'http://otrs_host/otrs',
  3462. frontend: false
  3463. )
  3464. Setting.create_if_not_exists(
  3465. title: __('Import Key'),
  3466. name: 'import_otrs_endpoint_key',
  3467. area: 'Import::OTRS',
  3468. description: __('Defines OTRS endpoint authentication key.'),
  3469. options: {
  3470. form: [
  3471. {
  3472. display: '',
  3473. null: false,
  3474. name: 'import_otrs_endpoint_key',
  3475. tag: 'input',
  3476. },
  3477. ],
  3478. },
  3479. state: '',
  3480. frontend: false
  3481. )
  3482. Setting.create_if_not_exists(
  3483. title: __('Import User for HTTP basic authentication'),
  3484. name: 'import_otrs_user',
  3485. area: 'Import::OTRS',
  3486. description: __('Defines HTTP basic authentication user (only if OTRS is protected via HTTP basic auth).'),
  3487. options: {
  3488. form: [
  3489. {
  3490. display: '',
  3491. null: true,
  3492. name: 'import_otrs_user',
  3493. tag: 'input',
  3494. },
  3495. ],
  3496. },
  3497. state: '',
  3498. frontend: false
  3499. )
  3500. Setting.create_if_not_exists(
  3501. title: __('Import Password for HTTP basic authentication'),
  3502. name: 'import_otrs_password',
  3503. area: 'Import::OTRS',
  3504. description: __('Defines HTTP basic authentication password (only if OTRS is protected via HTTP basic auth).'),
  3505. options: {
  3506. form: [
  3507. {
  3508. display: '',
  3509. null: true,
  3510. name: 'import_otrs_password',
  3511. tag: 'input',
  3512. },
  3513. ],
  3514. },
  3515. state: '',
  3516. frontend: false
  3517. )
  3518. Setting.create_if_not_exists(
  3519. title: __('Import Endpoint'),
  3520. name: 'import_zendesk_endpoint',
  3521. area: 'Import::Zendesk',
  3522. description: __('Defines a Zendesk endpoint to import users, tickets, states, and articles.'),
  3523. options: {
  3524. form: [
  3525. {
  3526. display: '',
  3527. null: false,
  3528. name: 'import_zendesk_endpoint',
  3529. tag: 'input',
  3530. },
  3531. ],
  3532. },
  3533. state: 'https://yours.zendesk.com/api/v2',
  3534. frontend: false
  3535. )
  3536. Setting.create_if_not_exists(
  3537. title: __('Import API key for requesting the Zendesk API'),
  3538. name: 'import_zendesk_endpoint_key',
  3539. area: 'Import::Zendesk',
  3540. description: __('Defines Zendesk endpoint authentication API key.'),
  3541. options: {
  3542. form: [
  3543. {
  3544. display: '',
  3545. null: false,
  3546. name: 'import_zendesk_endpoint_key',
  3547. tag: 'input',
  3548. },
  3549. ],
  3550. },
  3551. state: '',
  3552. frontend: false
  3553. )
  3554. Setting.create_if_not_exists(
  3555. title: __('Import User for requesting the Zendesk API'),
  3556. name: 'import_zendesk_endpoint_username',
  3557. area: 'Import::Zendesk',
  3558. description: __('Defines Zendesk endpoint authentication user.'),
  3559. options: {
  3560. form: [
  3561. {
  3562. display: '',
  3563. null: true,
  3564. name: 'import_zendesk_endpoint_username',
  3565. tag: 'input',
  3566. },
  3567. ],
  3568. },
  3569. state: '',
  3570. frontend: false
  3571. )
  3572. Setting.create_if_not_exists(
  3573. title: __('Import Endpoint'),
  3574. name: 'import_freshdesk_endpoint',
  3575. area: 'Import::Freshdesk',
  3576. description: __('Defines a Freshdesk endpoint to import users, tickets, states, and articles.'),
  3577. options: {
  3578. form: [
  3579. {
  3580. display: '',
  3581. null: false,
  3582. name: 'import_freshdesk_endpoint',
  3583. tag: 'input',
  3584. },
  3585. ],
  3586. },
  3587. state: 'https://yours.freshdesk.com/api/v2',
  3588. frontend: false
  3589. )
  3590. Setting.create_if_not_exists(
  3591. title: __('Import API key for requesting the Freshdesk API'),
  3592. name: 'import_freshdesk_endpoint_key',
  3593. area: 'Import::Freshdesk',
  3594. description: __('Defines Freshdesk endpoint authentication API key.'),
  3595. options: {
  3596. form: [
  3597. {
  3598. display: '',
  3599. null: false,
  3600. name: 'import_freshdesk_endpoint_key',
  3601. tag: 'input',
  3602. },
  3603. ],
  3604. },
  3605. state: '',
  3606. frontend: false
  3607. )
  3608. Setting.create_if_not_exists(
  3609. title: __('Import Endpoint'),
  3610. name: 'import_kayako_endpoint',
  3611. area: 'Import::Kayako',
  3612. description: __('Defines a Kayako endpoint to import users, tickets, states, and articles.'),
  3613. options: {
  3614. form: [
  3615. {
  3616. display: '',
  3617. null: false,
  3618. name: 'import_kayako_endpoint',
  3619. tag: 'input',
  3620. },
  3621. ],
  3622. },
  3623. state: 'https://yours.kayako.com/api/v1',
  3624. frontend: false
  3625. )
  3626. Setting.create_if_not_exists(
  3627. title: __('Import User for requesting the Kayako API'),
  3628. name: 'import_kayako_endpoint_username',
  3629. area: 'Import::Kayako',
  3630. description: __('Defines Kayako endpoint authentication user.'),
  3631. options: {
  3632. form: [
  3633. {
  3634. display: '',
  3635. null: false,
  3636. name: 'import_kayako_endpoint_username',
  3637. tag: 'input',
  3638. },
  3639. ],
  3640. },
  3641. state: '',
  3642. frontend: false
  3643. )
  3644. Setting.create_if_not_exists(
  3645. title: __('Import Password for requesting the Kayako API'),
  3646. name: 'import_kayako_endpoint_password',
  3647. area: 'Import::Kayako',
  3648. description: __('Defines Kayako endpoint authentication password.'),
  3649. options: {
  3650. form: [
  3651. {
  3652. display: '',
  3653. null: false,
  3654. name: 'import_kayako_endpoint_password',
  3655. tag: 'input',
  3656. },
  3657. ],
  3658. },
  3659. state: '',
  3660. frontend: false
  3661. )
  3662. Setting.create_if_not_exists(
  3663. title: __('Import Backends'),
  3664. name: 'import_backends',
  3665. area: 'Import',
  3666. description: __('A list of active import backends that gets scheduled automatically.'),
  3667. options: {},
  3668. state: ['Import::Ldap', 'Import::Exchange'],
  3669. preferences: {
  3670. permission: ['admin'],
  3671. },
  3672. frontend: false
  3673. )
  3674. Setting.create_if_not_exists(
  3675. title: __('Sequencer log level'),
  3676. name: 'sequencer_log_level',
  3677. area: 'Core',
  3678. description: __('Defines the log levels for various logging actions of the Sequencer.'),
  3679. options: {},
  3680. state: {
  3681. sequence: {
  3682. start_finish: :debug,
  3683. unit: :debug,
  3684. result: :debug,
  3685. },
  3686. state: {
  3687. optional: :debug,
  3688. set: :debug,
  3689. get: :debug,
  3690. attribute_initialization: {
  3691. start_finish: :debug,
  3692. attributes: :debug,
  3693. },
  3694. parameter_initialization: {
  3695. parameters: :debug,
  3696. start_finish: :debug,
  3697. unused: :debug,
  3698. },
  3699. expectations_initialization: :debug,
  3700. cleanup: {
  3701. start_finish: :debug,
  3702. remove: :debug,
  3703. }
  3704. }
  3705. },
  3706. frontend: false,
  3707. )
  3708. Setting.create_if_not_exists(
  3709. title: __('Time Accounting'),
  3710. name: 'time_accounting',
  3711. area: 'Web::Base',
  3712. description: __('Enable time accounting.'),
  3713. options: {
  3714. form: [
  3715. {
  3716. display: '',
  3717. null: true,
  3718. name: 'time_accounting',
  3719. tag: 'boolean',
  3720. options: {
  3721. true => 'yes',
  3722. false => 'no',
  3723. },
  3724. },
  3725. ],
  3726. },
  3727. preferences: {
  3728. authentication: true,
  3729. permission: ['admin.time_accounting'],
  3730. },
  3731. state: false,
  3732. frontend: true
  3733. )
  3734. Setting.create_if_not_exists(
  3735. title: __('Time Accounting Selector'),
  3736. name: 'time_accounting_selector',
  3737. area: 'Web::Base',
  3738. description: __('Enable time accounting for these tickets.'),
  3739. options: {
  3740. form: [
  3741. {},
  3742. ],
  3743. },
  3744. preferences: {
  3745. authentication: true,
  3746. permission: ['admin.time_accounting'],
  3747. },
  3748. state: {},
  3749. frontend: true
  3750. )
  3751. Setting.create_if_not_exists(
  3752. title: __('New Tags'),
  3753. name: 'tag_new',
  3754. area: 'Web::Base',
  3755. description: __('Allow users to create new tags.'),
  3756. options: {
  3757. form: [
  3758. {
  3759. display: '',
  3760. null: true,
  3761. name: 'tag_new',
  3762. tag: 'boolean',
  3763. options: {
  3764. true => 'yes',
  3765. false => 'no',
  3766. },
  3767. },
  3768. ],
  3769. },
  3770. preferences: {
  3771. authentication: true,
  3772. permission: ['admin.tag'],
  3773. },
  3774. state: true,
  3775. frontend: true
  3776. )
  3777. Setting.create_if_not_exists(
  3778. title: __('Default calendar tickets subscriptions'),
  3779. name: 'defaults_calendar_subscriptions_tickets',
  3780. area: 'Defaults::CalendarSubscriptions',
  3781. description: __('Defines the default calendar tickets subscription settings.'),
  3782. options: {},
  3783. state: {
  3784. escalation: {
  3785. own: true,
  3786. not_assigned: false,
  3787. },
  3788. new_open: {
  3789. own: true,
  3790. not_assigned: false,
  3791. },
  3792. pending: {
  3793. own: true,
  3794. not_assigned: false,
  3795. }
  3796. },
  3797. preferences: {
  3798. authentication: true,
  3799. },
  3800. frontend: true
  3801. )
  3802. Setting.create_if_not_exists(
  3803. title: __('Defines postmaster filter.'),
  3804. name: '0005_postmaster_filter_trusted',
  3805. area: 'Postmaster::PreFilter',
  3806. description: __('Defines postmaster filter to remove X-Zammad headers from untrustworthy sources.'),
  3807. options: {},
  3808. state: 'Channel::Filter::Trusted',
  3809. frontend: false
  3810. )
  3811. Setting.create_if_not_exists(
  3812. title: __('Defines postmaster filter.'),
  3813. name: '0006_postmaster_filter_auto_response_check',
  3814. area: 'Postmaster::PreFilter',
  3815. description: __('Defines postmaster filter to identify auto responses to prevent auto replies from Zammad.'),
  3816. options: {},
  3817. state: 'Channel::Filter::AutoResponseCheck',
  3818. frontend: false
  3819. )
  3820. Setting.create_if_not_exists(
  3821. title: __('Defines postmaster filter.'),
  3822. name: '0007_postmaster_filter_follow_up_check',
  3823. area: 'Postmaster::PreFilter',
  3824. description: __('Defines postmaster filter to identify follow-ups (based on admin settings).'),
  3825. options: {},
  3826. state: 'Channel::Filter::FollowUpCheck',
  3827. frontend: false
  3828. )
  3829. Setting.create_if_not_exists(
  3830. title: __('Defines postmaster filter.'),
  3831. name: '0008_postmaster_filter_follow_up_merged',
  3832. area: 'Postmaster::PreFilter',
  3833. description: __('Defines postmaster filter to identify follow-up ticket for merged tickets.'),
  3834. options: {},
  3835. state: 'Channel::Filter::FollowUpMerged',
  3836. frontend: false
  3837. )
  3838. Setting.create_if_not_exists(
  3839. title: __('Defines postmaster filter.'),
  3840. name: '0009_postmaster_filter_follow_up_assignment',
  3841. area: 'Postmaster::PreFilter',
  3842. description: __('Defines postmaster filter to set the owner (based on group follow up assignment).'),
  3843. options: {},
  3844. state: 'Channel::Filter::FollowUpAssignment',
  3845. frontend: false
  3846. )
  3847. Setting.create_if_not_exists(
  3848. title: __('Defines postmaster filter.'),
  3849. name: '0011_postmaster_sender_based_on_reply_to',
  3850. area: 'Postmaster::PreFilter',
  3851. description: __('Defines postmaster filter to set the sender/from of emails based on reply-to header.'),
  3852. options: {},
  3853. state: 'Channel::Filter::ReplyToBasedSender',
  3854. frontend: false
  3855. )
  3856. Setting.create_if_not_exists(
  3857. title: __('Define postmaster filter.'),
  3858. name: '0018_postmaster_import_archive',
  3859. area: 'Postmaster::PreFilter',
  3860. description: __('Define postmaster filter to import archive mailboxes.'),
  3861. options: {},
  3862. state: 'Channel::Filter::ImportArchive',
  3863. frontend: false
  3864. )
  3865. Setting.create_if_not_exists(
  3866. title: __('Defines postmaster filter.'),
  3867. name: '0012_postmaster_filter_sender_is_system_address',
  3868. area: 'Postmaster::PreFilter',
  3869. description: __('Defines postmaster filter to check if email has been created by Zammad itself and will set the article sender.'),
  3870. options: {},
  3871. state: 'Channel::Filter::SenderIsSystemAddress',
  3872. frontend: false
  3873. )
  3874. Setting.create_if_not_exists(
  3875. title: __('Defines postmaster filter.'),
  3876. name: '0014_postmaster_filter_own_notification_loop_detection',
  3877. area: 'Postmaster::PreFilter',
  3878. description: __('Defines postmaster filter to check if the email is a self-created notification email, then ignore it to prevent email loops.'),
  3879. options: {},
  3880. state: 'Channel::Filter::OwnNotificationLoopDetection',
  3881. frontend: false
  3882. )
  3883. Setting.create_if_not_exists(
  3884. title: __('Defines postmaster filter.'),
  3885. name: '0015_postmaster_filter_identify_sender',
  3886. area: 'Postmaster::PreFilter',
  3887. description: __('Defines postmaster filter to identify sender user.'),
  3888. options: {},
  3889. state: 'Channel::Filter::IdentifySender',
  3890. frontend: false
  3891. )
  3892. Setting.create_if_not_exists(
  3893. title: __('Defines postmaster filter.'),
  3894. name: '0016_postmaster_filter_smime',
  3895. area: 'Postmaster::PreFilter',
  3896. description: __('Defines postmaster filter to handle secure mailing.'),
  3897. options: {},
  3898. state: 'Channel::Filter::SecureMailing',
  3899. frontend: false
  3900. )
  3901. Setting.create_if_not_exists(
  3902. title: __('Defines postmaster filter.'),
  3903. name: '0030_postmaster_filter_out_of_office_check',
  3904. area: 'Postmaster::PreFilter',
  3905. description: __('Defines postmaster filter to identify out-of-office emails for follow-up detection and keeping current ticket state.'),
  3906. options: {},
  3907. state: 'Channel::Filter::OutOfOfficeCheck',
  3908. frontend: false
  3909. )
  3910. Setting.create_if_not_exists(
  3911. title: __('Defines postmaster filter.'),
  3912. name: '0200_postmaster_filter_follow_up_possible_check',
  3913. area: 'Postmaster::PreFilter',
  3914. description: __('Define postmaster filter to check if follow-ups get created (based on admin settings).'),
  3915. options: {},
  3916. state: 'Channel::Filter::FollowUpPossibleCheck',
  3917. frontend: false
  3918. )
  3919. Setting.create_if_not_exists(
  3920. title: __('Defines postmaster filter.'),
  3921. name: '0900_postmaster_filter_bounce_follow_up_check',
  3922. area: 'Postmaster::PreFilter',
  3923. description: __('Defines postmaster filter to identify postmaster bounces; and handles them as follow-up of the original tickets'),
  3924. options: {},
  3925. state: 'Channel::Filter::BounceFollowUpCheck',
  3926. frontend: false
  3927. )
  3928. Setting.create_if_not_exists(
  3929. title: __('Defines postmaster filter.'),
  3930. name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
  3931. area: 'Postmaster::PreFilter',
  3932. description: __('Defines postmaster filter to identify postmaster bounces; and disables sending notification if delivery fails permanently.'),
  3933. options: {},
  3934. state: 'Channel::Filter::BounceDeliveryPermanentFailed',
  3935. frontend: false
  3936. )
  3937. Setting.create_if_not_exists(
  3938. title: __('Defines postmaster filter.'),
  3939. name: '0955_postmaster_filter_bounce_delivery_temporary_failed',
  3940. area: 'Postmaster::PreFilter',
  3941. description: __('Defines postmaster filter to identify postmaster bounces; and reopens tickets if delivery fails permanently.'),
  3942. options: {},
  3943. state: 'Channel::Filter::BounceDeliveryTemporaryFailed',
  3944. frontend: false
  3945. )
  3946. Setting.create_if_not_exists(
  3947. title: __('Defines postmaster filter.'),
  3948. name: '1000_postmaster_filter_database_check',
  3949. area: 'Postmaster::PreFilter',
  3950. description: __('Defines postmaster filter for filters managed via admin interface.'),
  3951. options: {},
  3952. state: 'Channel::Filter::Database',
  3953. frontend: false
  3954. )
  3955. Setting.create_if_not_exists(
  3956. title: __('Defines postmaster filter.'),
  3957. name: '5000_postmaster_filter_icinga',
  3958. area: 'Postmaster::PreFilter',
  3959. description: __('Defines postmaster filter to manage Icinga (http://www.icinga.org) emails.'),
  3960. options: {},
  3961. state: 'Channel::Filter::Icinga',
  3962. frontend: false
  3963. )
  3964. Setting.create_if_not_exists(
  3965. title: __('Defines postmaster filter.'),
  3966. name: '5100_postmaster_filter_nagios',
  3967. area: 'Postmaster::PreFilter',
  3968. description: __('Defines postmaster filter to manage Nagios (http://www.nagios.org) emails.'),
  3969. options: {},
  3970. state: 'Channel::Filter::Nagios',
  3971. frontend: false
  3972. )
  3973. Setting.create_if_not_exists(
  3974. title: __('Defines postmaster filter.'),
  3975. name: '5300_postmaster_filter_monit',
  3976. area: 'Postmaster::PreFilter',
  3977. description: __('Defines postmaster filter to manage Monit (https://mmonit.com/monit/) emails.'),
  3978. options: {},
  3979. state: 'Channel::Filter::Monit',
  3980. frontend: false
  3981. )
  3982. Setting.create_if_not_exists(
  3983. title: __('Defines postmaster filter.'),
  3984. name: '5400_postmaster_filter_service_now_check',
  3985. area: 'Postmaster::PreFilter',
  3986. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  3987. options: {},
  3988. state: 'Channel::Filter::ServiceNowCheck',
  3989. frontend: false
  3990. )
  3991. Setting.create_if_not_exists(
  3992. title: __('Defines postmaster filter.'),
  3993. name: '5401_postmaster_filter_service_now_check',
  3994. area: 'Postmaster::PostFilter',
  3995. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  3996. options: {},
  3997. state: 'Channel::Filter::ServiceNowCheck',
  3998. frontend: false
  3999. )
  4000. Setting.create_if_not_exists(
  4001. title: __('Defines postmaster filter.'),
  4002. name: '5400_postmaster_filter_jira_check',
  4003. area: 'Postmaster::PreFilter',
  4004. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  4005. options: {},
  4006. state: 'Channel::Filter::JiraCheck',
  4007. frontend: false
  4008. )
  4009. Setting.create_if_not_exists(
  4010. title: __('Defines postmaster filter.'),
  4011. name: '5401_postmaster_filter_jira_check',
  4012. area: 'Postmaster::PostFilter',
  4013. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  4014. options: {},
  4015. state: 'Channel::Filter::JiraCheck',
  4016. frontend: false
  4017. )
  4018. Setting.create_if_not_exists(
  4019. title: __('Define postmaster filter.'),
  4020. name: '5500_postmaster_internal_article_check',
  4021. area: 'Postmaster::PreFilter',
  4022. description: __('Defines postmaster filter which sets the articles visibility to internal if it is a rely to an internal article or the last outgoing email is internal.'),
  4023. options: {},
  4024. state: 'Channel::Filter::InternalArticleCheck',
  4025. frontend: false
  4026. )
  4027. Setting.create_if_not_exists(
  4028. title: __('Icinga integration'),
  4029. name: 'icinga_integration',
  4030. area: 'Integration::Switch',
  4031. description: __('Defines if Icinga (http://www.icinga.org) is enabled or not.'),
  4032. options: {
  4033. form: [
  4034. {
  4035. display: '',
  4036. null: true,
  4037. name: 'icinga_integration',
  4038. tag: 'boolean',
  4039. options: {
  4040. true => 'yes',
  4041. false => 'no',
  4042. },
  4043. },
  4044. ],
  4045. },
  4046. state: false,
  4047. preferences: {
  4048. prio: 1,
  4049. permission: ['admin.integration'],
  4050. },
  4051. frontend: false
  4052. )
  4053. Setting.create_if_not_exists(
  4054. title: __('Sender'),
  4055. name: 'icinga_sender',
  4056. area: 'Integration::Icinga',
  4057. description: __('Defines the sender email address of Icinga emails.'),
  4058. options: {
  4059. form: [
  4060. {
  4061. display: '',
  4062. null: false,
  4063. name: 'icinga_sender',
  4064. tag: 'input',
  4065. placeholder: 'icinga@monitoring.example.com',
  4066. },
  4067. ],
  4068. },
  4069. state: 'icinga@monitoring.example.com',
  4070. preferences: {
  4071. prio: 2,
  4072. permission: ['admin.integration'],
  4073. },
  4074. frontend: false,
  4075. )
  4076. Setting.create_if_not_exists(
  4077. title: __('Auto close'),
  4078. name: 'icinga_auto_close',
  4079. area: 'Integration::Icinga',
  4080. description: __('Defines if tickets should be closed if service is recovered.'),
  4081. options: {
  4082. form: [
  4083. {
  4084. display: '',
  4085. null: true,
  4086. name: 'icinga_auto_close',
  4087. tag: 'boolean',
  4088. options: {
  4089. true => 'yes',
  4090. false => 'no',
  4091. },
  4092. },
  4093. ],
  4094. },
  4095. state: true,
  4096. preferences: {
  4097. prio: 3,
  4098. permission: ['admin.integration'],
  4099. },
  4100. frontend: false
  4101. )
  4102. Setting.create_if_not_exists(
  4103. title: __('Auto-close state'),
  4104. name: 'icinga_auto_close_state_id',
  4105. area: 'Integration::Icinga',
  4106. description: __('Defines the state of auto-closed tickets.'),
  4107. options: {
  4108. form: [
  4109. {
  4110. display: '',
  4111. null: false,
  4112. name: 'icinga_auto_close_state_id',
  4113. tag: 'select',
  4114. relation: 'TicketState',
  4115. },
  4116. ],
  4117. },
  4118. state: 4,
  4119. preferences: {
  4120. prio: 4,
  4121. permission: ['admin.integration'],
  4122. },
  4123. frontend: false
  4124. )
  4125. Setting.create_if_not_exists(
  4126. title: __('Nagios integration'),
  4127. name: 'nagios_integration',
  4128. area: 'Integration::Switch',
  4129. description: __('Defines if Nagios (http://www.nagios.org) is enabled or not.'),
  4130. options: {
  4131. form: [
  4132. {
  4133. display: '',
  4134. null: true,
  4135. name: 'nagios_integration',
  4136. tag: 'boolean',
  4137. options: {
  4138. true => 'yes',
  4139. false => 'no',
  4140. },
  4141. },
  4142. ],
  4143. },
  4144. state: false,
  4145. preferences: {
  4146. prio: 1,
  4147. permission: ['admin.integration'],
  4148. },
  4149. frontend: false
  4150. )
  4151. Setting.create_if_not_exists(
  4152. title: __('Sender'),
  4153. name: 'nagios_sender',
  4154. area: 'Integration::Nagios',
  4155. description: __('Defines the sender email address of Nagios emails.'),
  4156. options: {
  4157. form: [
  4158. {
  4159. display: '',
  4160. null: false,
  4161. name: 'nagios_sender',
  4162. tag: 'input',
  4163. placeholder: 'nagios@monitoring.example.com',
  4164. },
  4165. ],
  4166. },
  4167. state: 'nagios@monitoring.example.com',
  4168. preferences: {
  4169. prio: 2,
  4170. permission: ['admin.integration'],
  4171. },
  4172. frontend: false,
  4173. )
  4174. Setting.create_if_not_exists(
  4175. title: __('Auto close'),
  4176. name: 'nagios_auto_close',
  4177. area: 'Integration::Nagios',
  4178. description: __('Defines if tickets should be closed if service is recovered.'),
  4179. options: {
  4180. form: [
  4181. {
  4182. display: '',
  4183. null: true,
  4184. name: 'nagios_auto_close',
  4185. tag: 'boolean',
  4186. options: {
  4187. true => 'yes',
  4188. false => 'no',
  4189. },
  4190. },
  4191. ],
  4192. },
  4193. state: true,
  4194. preferences: {
  4195. prio: 3,
  4196. permission: ['admin.integration'],
  4197. },
  4198. frontend: false
  4199. )
  4200. Setting.create_if_not_exists(
  4201. title: __('Auto-close state'),
  4202. name: 'nagios_auto_close_state_id',
  4203. area: 'Integration::Nagios',
  4204. description: __('Defines the state of auto-closed tickets.'),
  4205. options: {
  4206. form: [
  4207. {
  4208. display: '',
  4209. null: false,
  4210. name: 'nagios_auto_close_state_id',
  4211. tag: 'select',
  4212. relation: 'TicketState',
  4213. },
  4214. ],
  4215. },
  4216. state: 4,
  4217. preferences: {
  4218. prio: 4,
  4219. permission: ['admin.integration'],
  4220. },
  4221. frontend: false
  4222. )
  4223. Setting.create_if_not_exists(
  4224. title: __('Checkmk integration'),
  4225. name: 'check_mk_integration',
  4226. area: 'Integration::Switch',
  4227. description: __('Defines if Checkmk (https://checkmk.com/) is enabled or not.'),
  4228. options: {
  4229. form: [
  4230. {
  4231. display: '',
  4232. null: true,
  4233. name: 'check_mk_integration',
  4234. tag: 'boolean',
  4235. options: {
  4236. true => 'yes',
  4237. false => 'no',
  4238. },
  4239. },
  4240. ],
  4241. },
  4242. state: false,
  4243. preferences: {
  4244. prio: 1,
  4245. permission: ['admin.integration'],
  4246. },
  4247. frontend: false
  4248. )
  4249. Setting.create_if_not_exists(
  4250. title: __('Group'),
  4251. name: 'check_mk_group_id',
  4252. area: 'Integration::CheckMK',
  4253. description: __('Defines the group of created tickets.'),
  4254. options: {
  4255. form: [
  4256. {
  4257. display: '',
  4258. null: false,
  4259. name: 'check_mk_group_id',
  4260. tag: 'select',
  4261. relation: 'Group',
  4262. },
  4263. ],
  4264. },
  4265. state: 1,
  4266. preferences: {
  4267. prio: 2,
  4268. permission: ['admin.integration'],
  4269. },
  4270. frontend: false
  4271. )
  4272. Setting.create_if_not_exists(
  4273. title: __('Auto close'),
  4274. name: 'check_mk_auto_close',
  4275. area: 'Integration::CheckMK',
  4276. description: __('Defines if tickets should be closed if service is recovered.'),
  4277. options: {
  4278. form: [
  4279. {
  4280. display: '',
  4281. null: true,
  4282. name: 'check_mk_auto_close',
  4283. tag: 'boolean',
  4284. options: {
  4285. true => 'yes',
  4286. false => 'no',
  4287. },
  4288. },
  4289. ],
  4290. },
  4291. state: true,
  4292. preferences: {
  4293. prio: 3,
  4294. permission: ['admin.integration'],
  4295. },
  4296. frontend: false
  4297. )
  4298. Setting.create_if_not_exists(
  4299. title: __('Auto-close state'),
  4300. name: 'check_mk_auto_close_state_id',
  4301. area: 'Integration::CheckMK',
  4302. description: __('Defines the state of auto-closed tickets.'),
  4303. options: {
  4304. form: [
  4305. {
  4306. display: '',
  4307. null: false,
  4308. name: 'check_mk_auto_close_state_id',
  4309. tag: 'select',
  4310. relation: 'TicketState',
  4311. },
  4312. ],
  4313. },
  4314. state: 4,
  4315. preferences: {
  4316. prio: 4,
  4317. permission: ['admin.integration'],
  4318. },
  4319. frontend: false
  4320. )
  4321. Setting.create_if_not_exists(
  4322. title: __('Checkmk token'),
  4323. name: 'check_mk_token',
  4324. area: 'Core',
  4325. description: __('Defines the Checkmk token for allowing updates.'),
  4326. options: {},
  4327. state: ENV['CHECK_MK_TOKEN'] || SecureRandom.hex(16),
  4328. preferences: {
  4329. permission: ['admin.integration'],
  4330. },
  4331. frontend: false
  4332. )
  4333. Setting.create_if_not_exists(
  4334. title: __('Monit integration'),
  4335. name: 'monit_integration',
  4336. area: 'Integration::Switch',
  4337. description: __('Defines if Monit (https://mmonit.com/monit/) is enabled or not.'),
  4338. options: {
  4339. form: [
  4340. {
  4341. display: '',
  4342. null: true,
  4343. name: 'monit_integration',
  4344. tag: 'boolean',
  4345. options: {
  4346. true => 'yes',
  4347. false => 'no',
  4348. },
  4349. },
  4350. ],
  4351. },
  4352. state: false,
  4353. preferences: {
  4354. prio: 1,
  4355. permission: ['admin.integration'],
  4356. },
  4357. frontend: false
  4358. )
  4359. Setting.create_if_not_exists(
  4360. title: __('Sender'),
  4361. name: 'monit_sender',
  4362. area: 'Integration::Monit',
  4363. description: __('Defines the sender email address of the service emails.'),
  4364. options: {
  4365. form: [
  4366. {
  4367. display: '',
  4368. null: false,
  4369. name: 'monit_sender',
  4370. tag: 'input',
  4371. placeholder: 'monit@monitoring.example.com',
  4372. },
  4373. ],
  4374. },
  4375. state: 'monit@monitoring.example.com',
  4376. preferences: {
  4377. prio: 2,
  4378. permission: ['admin.integration'],
  4379. },
  4380. frontend: false,
  4381. )
  4382. Setting.create_if_not_exists(
  4383. title: __('Auto close'),
  4384. name: 'monit_auto_close',
  4385. area: 'Integration::Monit',
  4386. description: __('Defines if tickets should be closed if service is recovered.'),
  4387. options: {
  4388. form: [
  4389. {
  4390. display: '',
  4391. null: true,
  4392. name: 'monit_auto_close',
  4393. tag: 'boolean',
  4394. options: {
  4395. true => 'yes',
  4396. false => 'no',
  4397. },
  4398. translate: true,
  4399. },
  4400. ],
  4401. },
  4402. state: true,
  4403. preferences: {
  4404. prio: 3,
  4405. permission: ['admin.integration'],
  4406. },
  4407. frontend: false
  4408. )
  4409. Setting.create_if_not_exists(
  4410. title: __('Auto-close state'),
  4411. name: 'monit_auto_close_state_id',
  4412. area: 'Integration::Monit',
  4413. description: __('Defines the state of auto-closed tickets.'),
  4414. options: {
  4415. form: [
  4416. {
  4417. display: '',
  4418. null: false,
  4419. name: 'monit_auto_close_state_id',
  4420. tag: 'select',
  4421. relation: 'TicketState',
  4422. translate: true,
  4423. },
  4424. ],
  4425. },
  4426. state: 4,
  4427. preferences: {
  4428. prio: 4,
  4429. permission: ['admin.integration'],
  4430. },
  4431. frontend: false
  4432. )
  4433. Setting.create_if_not_exists(
  4434. title: __('LDAP integration'),
  4435. name: 'ldap_integration',
  4436. area: 'Integration::Switch',
  4437. description: __('Defines if LDAP is enabled or not.'),
  4438. options: {
  4439. form: [
  4440. {
  4441. display: '',
  4442. null: true,
  4443. name: 'ldap_integration',
  4444. tag: 'boolean',
  4445. options: {
  4446. true => 'yes',
  4447. false => 'no',
  4448. },
  4449. },
  4450. ],
  4451. },
  4452. state: false,
  4453. preferences: {
  4454. prio: 1,
  4455. authentication: true,
  4456. permission: ['admin.integration'],
  4457. },
  4458. frontend: true
  4459. )
  4460. Setting.create_if_not_exists(
  4461. title: __('Exchange config'),
  4462. name: 'exchange_config',
  4463. area: 'Integration::Exchange',
  4464. description: __('Defines the Exchange config.'),
  4465. options: {},
  4466. state: {},
  4467. preferences: {
  4468. prio: 2,
  4469. permission: ['admin.integration'],
  4470. },
  4471. frontend: false,
  4472. )
  4473. Setting.create_if_not_exists(
  4474. title: __('Exchange OAuth'),
  4475. name: 'exchange_oauth',
  4476. area: 'Integration::Exchange',
  4477. description: __('Defines the Exchange OAuth config.'),
  4478. options: {},
  4479. state: {},
  4480. preferences: {
  4481. prio: 2,
  4482. permission: ['admin.integration'],
  4483. },
  4484. frontend: false,
  4485. )
  4486. Setting.create_if_not_exists(
  4487. title: __('Exchange integration'),
  4488. name: 'exchange_integration',
  4489. area: 'Integration::Switch',
  4490. description: __('Defines if Exchange is enabled or not.'),
  4491. options: {
  4492. form: [
  4493. {
  4494. display: '',
  4495. null: true,
  4496. name: 'exchange_integration',
  4497. tag: 'boolean',
  4498. options: {
  4499. true => 'yes',
  4500. false => 'no',
  4501. },
  4502. },
  4503. ],
  4504. },
  4505. state: false,
  4506. preferences: {
  4507. prio: 1,
  4508. authentication: true,
  4509. permission: ['admin.integration'],
  4510. },
  4511. frontend: true
  4512. )
  4513. Setting.create_if_not_exists(
  4514. title: __('i-doit integration'),
  4515. name: 'idoit_integration',
  4516. area: 'Integration::Switch',
  4517. description: __('Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not.'),
  4518. options: {
  4519. form: [
  4520. {
  4521. display: '',
  4522. null: true,
  4523. name: 'idoit_integration',
  4524. tag: 'boolean',
  4525. options: {
  4526. true => 'yes',
  4527. false => 'no',
  4528. },
  4529. },
  4530. ],
  4531. },
  4532. state: false,
  4533. preferences: {
  4534. prio: 1,
  4535. authentication: true,
  4536. permission: ['admin.integration'],
  4537. },
  4538. frontend: true
  4539. )
  4540. Setting.create_if_not_exists(
  4541. title: __('i-doit config'),
  4542. name: 'idoit_config',
  4543. area: 'Integration::Idoit',
  4544. description: __('Defines the i-doit config.'),
  4545. options: {},
  4546. state: {},
  4547. preferences: {
  4548. prio: 2,
  4549. permission: ['admin.integration'],
  4550. },
  4551. frontend: false,
  4552. )
  4553. Setting.create_if_not_exists(
  4554. title: __('GitLab integration'),
  4555. name: 'gitlab_integration',
  4556. area: 'Integration::Switch',
  4557. description: __('Defines if the GitLab (http://www.gitlab.com) integration is enabled or not.'),
  4558. options: {
  4559. form: [
  4560. {
  4561. display: '',
  4562. null: true,
  4563. name: 'gitlab_integration',
  4564. tag: 'boolean',
  4565. options: {
  4566. true => 'yes',
  4567. false => 'no',
  4568. },
  4569. },
  4570. ],
  4571. },
  4572. state: false,
  4573. preferences: {
  4574. prio: 1,
  4575. authentication: true,
  4576. permission: ['admin.integration'],
  4577. },
  4578. frontend: true
  4579. )
  4580. Setting.create_if_not_exists(
  4581. title: __('GitLab config'),
  4582. name: 'gitlab_config',
  4583. area: 'Integration::GitLab',
  4584. description: __('Stores the GitLab configuration.'),
  4585. options: {},
  4586. state: {
  4587. endpoint: 'https://gitlab.com/api/graphql',
  4588. },
  4589. preferences: {
  4590. prio: 2,
  4591. permission: ['admin.integration'],
  4592. },
  4593. frontend: false,
  4594. )
  4595. Setting.create_if_not_exists(
  4596. title: __('GitHub integration'),
  4597. name: 'github_integration',
  4598. area: 'Integration::Switch',
  4599. description: __('Defines if the GitHub (http://www.github.com) integration is enabled or not.'),
  4600. options: {
  4601. form: [
  4602. {
  4603. display: '',
  4604. null: true,
  4605. name: 'github_integration',
  4606. tag: 'boolean',
  4607. options: {
  4608. true => 'yes',
  4609. false => 'no',
  4610. },
  4611. },
  4612. ],
  4613. },
  4614. state: false,
  4615. preferences: {
  4616. prio: 1,
  4617. authentication: true,
  4618. permission: ['admin.integration'],
  4619. },
  4620. frontend: true
  4621. )
  4622. Setting.create_if_not_exists(
  4623. title: __('GitHub config'),
  4624. name: 'github_config',
  4625. area: 'Integration::GitHub',
  4626. description: __('Stores the GitHub configuration.'),
  4627. options: {},
  4628. state: {
  4629. endpoint: 'https://api.github.com/graphql',
  4630. },
  4631. preferences: {
  4632. prio: 2,
  4633. permission: ['admin.integration'],
  4634. },
  4635. frontend: false,
  4636. )
  4637. Setting.create_if_not_exists(
  4638. title: __('Defines sync transaction backend.'),
  4639. name: '0100_trigger',
  4640. area: 'Transaction::Backend::Sync',
  4641. description: __('Defines the transaction backend to execute triggers.'),
  4642. options: {},
  4643. state: 'Transaction::Trigger',
  4644. frontend: false
  4645. )
  4646. Setting.create_if_not_exists(
  4647. title: __('Defines transaction backend.'),
  4648. name: '0100_notification',
  4649. area: 'Transaction::Backend::Async',
  4650. description: __('Defines the transaction backend to send agent notifications.'),
  4651. options: {},
  4652. state: 'Transaction::Notification',
  4653. frontend: false
  4654. )
  4655. Setting.create_if_not_exists(
  4656. title: __('Defines transaction backend.'),
  4657. name: '1000_signature_detection',
  4658. area: 'Transaction::Backend::Async',
  4659. description: __('Defines the transaction backend to detect customer signatures in emails.'),
  4660. options: {},
  4661. state: 'Transaction::SignatureDetection',
  4662. frontend: false
  4663. )
  4664. Setting.create_if_not_exists(
  4665. title: __('Defines transaction backend.'),
  4666. name: '6000_slack_webhook',
  4667. area: 'Transaction::Backend::Async',
  4668. description: __('Defines the transaction backend which posts messages to Slack (http://www.slack.com).'),
  4669. options: {},
  4670. state: 'Transaction::Slack',
  4671. frontend: false
  4672. )
  4673. Setting.create_if_not_exists(
  4674. title: __('Slack integration'),
  4675. name: 'slack_integration',
  4676. area: 'Integration::Switch',
  4677. description: __('Defines if Slack (http://www.slack.org) is enabled or not.'),
  4678. options: {
  4679. form: [
  4680. {
  4681. display: '',
  4682. null: true,
  4683. name: 'slack_integration',
  4684. tag: 'boolean',
  4685. options: {
  4686. true => 'yes',
  4687. false => 'no',
  4688. },
  4689. },
  4690. ],
  4691. },
  4692. state: false,
  4693. preferences: {
  4694. prio: 1,
  4695. permission: ['admin.integration'],
  4696. },
  4697. frontend: false
  4698. )
  4699. Setting.create_if_not_exists(
  4700. title: __('Slack config'),
  4701. name: 'slack_config',
  4702. area: 'Integration::Slack',
  4703. description: __('Defines the Slack config.'),
  4704. options: {},
  4705. state: {
  4706. items: []
  4707. },
  4708. preferences: {
  4709. prio: 2,
  4710. permission: ['admin.integration'],
  4711. },
  4712. frontend: false,
  4713. )
  4714. Setting.create_if_not_exists(
  4715. title: __('sipgate.io integration'),
  4716. name: 'sipgate_integration',
  4717. area: 'Integration::Switch',
  4718. description: __('Defines if sipgate.io (http://www.sipgate.io) is enabled or not.'),
  4719. options: {
  4720. form: [
  4721. {
  4722. display: '',
  4723. null: true,
  4724. name: 'sipgate_integration',
  4725. tag: 'boolean',
  4726. options: {
  4727. true => 'yes',
  4728. false => 'no',
  4729. },
  4730. },
  4731. ],
  4732. },
  4733. state: false,
  4734. preferences: {
  4735. prio: 1,
  4736. trigger: ['menu:render', 'cti:reload'],
  4737. authentication: true,
  4738. permission: ['admin.integration'],
  4739. },
  4740. frontend: true
  4741. )
  4742. Setting.create_if_not_exists(
  4743. title: __('sipgate.io Token'),
  4744. name: 'sipgate_token',
  4745. area: 'Integration::Sipgate',
  4746. description: __('Token for Sipgate.'),
  4747. options: {
  4748. form: [
  4749. {
  4750. display: '',
  4751. null: false,
  4752. name: 'sipgate_token',
  4753. tag: 'input',
  4754. },
  4755. ],
  4756. },
  4757. state: ENV['SIPGATE_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4758. preferences: {
  4759. permission: ['admin.integration'],
  4760. },
  4761. frontend: false
  4762. )
  4763. Setting.create_if_not_exists(
  4764. title: __('sipgate.io config'),
  4765. name: 'sipgate_config',
  4766. area: 'Integration::Sipgate',
  4767. description: __('Defines the sipgate.io config.'),
  4768. options: {},
  4769. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4770. preferences: {
  4771. prio: 2,
  4772. permission: ['admin.integration'],
  4773. },
  4774. frontend: false,
  4775. )
  4776. Setting.create_if_not_exists(
  4777. title: __('sipgate.io alternative FQDN'),
  4778. name: 'sipgate_alternative_fqdn',
  4779. area: 'Integration::Sipgate::Expert',
  4780. description: __('Alternative FQDN for callbacks if you operate Zammad in an internal network.'),
  4781. options: {
  4782. form: [
  4783. {
  4784. display: '',
  4785. null: false,
  4786. name: 'sipgate_alternative_fqdn',
  4787. tag: 'input',
  4788. },
  4789. ],
  4790. },
  4791. state: '',
  4792. preferences: {
  4793. permission: ['admin.integration'],
  4794. },
  4795. frontend: false
  4796. )
  4797. Setting.create_if_not_exists(
  4798. title: __('CTI integration'),
  4799. name: 'cti_integration',
  4800. area: 'Integration::Switch',
  4801. description: __('Defines if generic CTI integration is enabled or not.'),
  4802. options: {
  4803. form: [
  4804. {
  4805. display: '',
  4806. null: true,
  4807. name: 'cti_integration',
  4808. tag: 'boolean',
  4809. options: {
  4810. true => 'yes',
  4811. false => 'no',
  4812. },
  4813. },
  4814. ],
  4815. },
  4816. state: false,
  4817. preferences: {
  4818. prio: 1,
  4819. trigger: ['menu:render', 'cti:reload'],
  4820. authentication: true,
  4821. permission: ['admin.integration'],
  4822. },
  4823. frontend: true
  4824. )
  4825. Setting.create_if_not_exists(
  4826. title: __('CTI config'),
  4827. name: 'cti_config',
  4828. area: 'Integration::Cti',
  4829. description: __('Defines the CTI config.'),
  4830. options: {},
  4831. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4832. preferences: {
  4833. prio: 2,
  4834. permission: ['admin.integration'],
  4835. },
  4836. frontend: false,
  4837. )
  4838. Setting.create_if_not_exists(
  4839. title: __('CTI Token'),
  4840. name: 'cti_token',
  4841. area: 'Integration::Cti',
  4842. description: __('Token for CTI.'),
  4843. options: {
  4844. form: [
  4845. {
  4846. display: '',
  4847. null: false,
  4848. name: 'cti_token',
  4849. tag: 'input',
  4850. },
  4851. ],
  4852. },
  4853. state: ENV['CTI_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4854. preferences: {
  4855. permission: ['admin.integration'],
  4856. },
  4857. frontend: false
  4858. )
  4859. Setting.create_if_not_exists(
  4860. title: __('CTI customer last activity'),
  4861. name: 'cti_customer_last_activity',
  4862. area: 'Integration::Cti',
  4863. description: __('Defines the duration of customer activity (in seconds) on a call until the user profile dialog is shown.'),
  4864. options: {},
  4865. state: 30.days,
  4866. preferences: {
  4867. prio: 2,
  4868. permission: ['admin.integration'],
  4869. },
  4870. frontend: false,
  4871. )
  4872. Setting.create_if_not_exists(
  4873. title: __('Placetel integration'),
  4874. name: 'placetel_integration',
  4875. area: 'Integration::Switch',
  4876. description: __('Defines if Placetel (http://www.placetel.de) is enabled or not.'),
  4877. options: {
  4878. form: [
  4879. {
  4880. display: '',
  4881. null: true,
  4882. name: 'placetel_integration',
  4883. tag: 'boolean',
  4884. options: {
  4885. true => 'yes',
  4886. false => 'no',
  4887. },
  4888. },
  4889. ],
  4890. },
  4891. state: false,
  4892. preferences: {
  4893. prio: 1,
  4894. trigger: ['menu:render', 'cti:reload'],
  4895. authentication: true,
  4896. permission: ['admin.integration'],
  4897. },
  4898. frontend: true
  4899. )
  4900. Setting.create_if_not_exists(
  4901. title: __('Placetel config'),
  4902. name: 'placetel_config',
  4903. area: 'Integration::Placetel',
  4904. description: __('Defines the Placetel config.'),
  4905. options: {},
  4906. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4907. preferences: {
  4908. prio: 2,
  4909. permission: ['admin.integration'],
  4910. cache: ['placetelGetVoipUsers'],
  4911. },
  4912. frontend: false,
  4913. )
  4914. Setting.create_if_not_exists(
  4915. title: __('Placetel Token'),
  4916. name: 'placetel_token',
  4917. area: 'Integration::Placetel',
  4918. description: __('Defines the token for Placetel.'),
  4919. options: {
  4920. form: [
  4921. {
  4922. display: '',
  4923. null: false,
  4924. name: 'placetel_token',
  4925. tag: 'input',
  4926. },
  4927. ],
  4928. },
  4929. state: ENV['PLACETEL_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4930. preferences: {
  4931. permission: ['admin.integration'],
  4932. },
  4933. frontend: false
  4934. )
  4935. Setting.create_if_not_exists(
  4936. title: __('Clearbit integration'),
  4937. name: 'clearbit_integration',
  4938. area: 'Integration::Switch',
  4939. description: __('Defines if Clearbit (http://www.clearbit.com) is enabled or not.'),
  4940. options: {
  4941. form: [
  4942. {
  4943. display: '',
  4944. null: true,
  4945. name: 'clearbit_integration',
  4946. tag: 'boolean',
  4947. options: {
  4948. true => 'yes',
  4949. false => 'no',
  4950. },
  4951. },
  4952. ],
  4953. },
  4954. state: false,
  4955. preferences: {
  4956. prio: 1,
  4957. permission: ['admin.integration'],
  4958. },
  4959. frontend: false
  4960. )
  4961. Setting.create_if_not_exists(
  4962. title: __('Clearbit config'),
  4963. name: 'clearbit_config',
  4964. area: 'Integration::Clearbit',
  4965. description: __('Defines the Clearbit config.'),
  4966. options: {},
  4967. state: {},
  4968. frontend: false,
  4969. preferences: {
  4970. prio: 2,
  4971. permission: ['admin.integration'],
  4972. },
  4973. )
  4974. Setting.create_if_not_exists(
  4975. title: __('Defines transaction backend.'),
  4976. name: '9000_clearbit_enrichment',
  4977. area: 'Transaction::Backend::Async',
  4978. description: __('Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com).'),
  4979. options: {},
  4980. state: 'Transaction::ClearbitEnrichment',
  4981. frontend: false
  4982. )
  4983. Setting.create_if_not_exists(
  4984. title: __('Defines transaction backend.'),
  4985. name: '9100_cti_caller_id_detection',
  4986. area: 'Transaction::Backend::Async',
  4987. description: __('Defines the transaction backend which detects caller IDs in objects and stores them for CTI lookups.'),
  4988. options: {},
  4989. state: 'Transaction::CtiCallerIdDetection',
  4990. frontend: false
  4991. )
  4992. Setting.create_if_not_exists(
  4993. title: __('Defines transaction backend.'),
  4994. name: '9200_time_based_trigger',
  4995. area: 'Transaction::Backend::Async',
  4996. description: __('Defines the transaction backend which executes time based triggers.'),
  4997. options: {},
  4998. state: 'Transaction::TimeBasedTrigger',
  4999. frontend: false
  5000. )
  5001. Setting.create_if_not_exists(
  5002. title: __('Set agent limit'),
  5003. name: 'system_agent_limit',
  5004. area: 'Core::Online',
  5005. description: __('Defines the agent limit.'),
  5006. options: {},
  5007. state: false,
  5008. preferences: { online_service_disable: true },
  5009. frontend: false
  5010. )
  5011. Setting.create_if_not_exists(
  5012. title: __('HTML Email CSS Font'),
  5013. name: 'html_email_css_font',
  5014. area: 'Core',
  5015. description: __('Defines the CSS font information for HTML emails.'),
  5016. options: {},
  5017. state: "font-family:'Helvetica Neue', Helvetica, Arial, Geneva, sans-serif; font-size: 12px;",
  5018. preferences: {
  5019. permission: ['admin'],
  5020. },
  5021. frontend: false
  5022. )
  5023. Setting.create_if_not_exists(
  5024. title: __('HTML Sanitizer Processing Timeout'),
  5025. name: 'html_sanitizer_processing_timeout',
  5026. area: 'Core',
  5027. description: __('Defines processing timeout for the html sanitizer.'),
  5028. options: {},
  5029. state: 20,
  5030. preferences: {},
  5031. frontend: false
  5032. )
  5033. # add the dashboard stats backend for 'Stats::TicketWaitingTime'
  5034. Setting.create_if_not_exists(
  5035. title: __('Stats Backend'),
  5036. name: 'Stats::TicketWaitingTime',
  5037. area: 'Dashboard::Stats',
  5038. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5039. options: {},
  5040. state: 'Stats::TicketWaitingTime',
  5041. preferences: {
  5042. permission: ['ticket.agent'],
  5043. prio: 1,
  5044. },
  5045. frontend: false
  5046. )
  5047. # add the dashboard stats backend for 'Stats::TicketEscalation'
  5048. Setting.create_if_not_exists(
  5049. title: __('Stats Backend'),
  5050. name: 'Stats::TicketEscalation',
  5051. area: 'Dashboard::Stats',
  5052. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5053. options: {},
  5054. state: 'Stats::TicketEscalation',
  5055. preferences: {
  5056. permission: ['ticket.agent'],
  5057. prio: 2,
  5058. },
  5059. frontend: false
  5060. )
  5061. # add the dashboard stats backend for 'Stats::TicketChannelDistribution'
  5062. Setting.create_if_not_exists(
  5063. title: __('Stats Backend'),
  5064. name: 'Stats::TicketChannelDistribution',
  5065. area: 'Dashboard::Stats',
  5066. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5067. options: {},
  5068. state: 'Stats::TicketChannelDistribution',
  5069. preferences: {
  5070. permission: ['ticket.agent'],
  5071. prio: 3,
  5072. },
  5073. frontend: false
  5074. )
  5075. # add the dashboard stats backend for 'Stats::TicketLoadMeasure'
  5076. Setting.create_if_not_exists(
  5077. title: __('Stats Backend'),
  5078. name: 'Stats::TicketLoadMeasure',
  5079. area: 'Dashboard::Stats',
  5080. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5081. options: {},
  5082. state: 'Stats::TicketLoadMeasure',
  5083. preferences: {
  5084. permission: ['ticket.agent'],
  5085. prio: 4,
  5086. },
  5087. frontend: false
  5088. )
  5089. # add the dashboard stats backend for 'Stats::TicketInProcess'
  5090. Setting.create_if_not_exists(
  5091. title: __('Stats Backend'),
  5092. name: 'Stats::TicketInProcess',
  5093. area: 'Dashboard::Stats',
  5094. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5095. options: {},
  5096. state: 'Stats::TicketInProcess',
  5097. preferences: {
  5098. permission: ['ticket.agent'],
  5099. prio: 5,
  5100. },
  5101. frontend: false
  5102. )
  5103. # add the dashboard stats backend for 'Stats::TicketReopen'
  5104. Setting.create_if_not_exists(
  5105. title: __('Stats Backend'),
  5106. name: 'Stats::TicketReopen',
  5107. area: 'Dashboard::Stats',
  5108. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5109. options: {},
  5110. state: 'Stats::TicketReopen',
  5111. preferences: {
  5112. permission: ['ticket.agent'],
  5113. prio: 6,
  5114. },
  5115. frontend: false
  5116. )
  5117. Setting.create_if_not_exists(
  5118. title: __('Knowledge Base multilingual support'),
  5119. name: 'kb_multi_lingual_support',
  5120. area: 'Kb::Core',
  5121. description: __('Support of multilingual Knowledge Base.'),
  5122. options: {},
  5123. state: true,
  5124. preferences: { online_service_disable: true },
  5125. frontend: true
  5126. )
  5127. Setting.create_if_not_exists(
  5128. title: __('Knowledge Base active'),
  5129. name: 'kb_active',
  5130. area: 'Kb::Core',
  5131. description: __('Defines if Knowledge Base navbar button is enabled.'),
  5132. state: true,
  5133. preferences: {
  5134. prio: 1,
  5135. trigger: ['menu:render'],
  5136. authentication: true,
  5137. permission: ['admin.knowledge_base'],
  5138. },
  5139. frontend: true
  5140. )
  5141. Setting.create_if_not_exists(
  5142. title: __('Knowledge Base active publicly'),
  5143. name: 'kb_active_publicly',
  5144. area: 'Kb::Core',
  5145. description: __('Defines if Knowledge Base navbar button is enabled for users without Knowledge Base permission.'),
  5146. state: false,
  5147. preferences: {
  5148. prio: 1,
  5149. trigger: ['menu:render'],
  5150. authentication: true,
  5151. permission: [],
  5152. },
  5153. frontend: true
  5154. )
  5155. Setting.create_if_not_exists(
  5156. title: __('Defines the timeframe during which a self-created note can be deleted.'),
  5157. name: 'ui_ticket_zoom_article_delete_timeframe',
  5158. area: 'UI::TicketZoomArticle',
  5159. description: __("Set timeframe in seconds. If it's set to 0 you can delete notes without time limits"),
  5160. options: {},
  5161. state: 600,
  5162. preferences: {
  5163. permission: ['admin.ui']
  5164. },
  5165. frontend: true
  5166. )
  5167. Setting.create_if_not_exists(
  5168. title: __('Hint for adding an article to an existing ticket.'),
  5169. name: 'ui_ticket_add_article_hint',
  5170. area: 'UI::TicketZoomArticle',
  5171. description: __('Highlights if the note a user is writing is public or private'),
  5172. options: {},
  5173. state: {
  5174. # 'note-internal' => 'You are writing an |internal note|, only people of your organization will see it.',
  5175. # 'note-public' => 'You are writing a |public note|.',
  5176. # 'phone-internal' => 'You are writing an |internal phone note|, only people of your organization will see it.',
  5177. # 'phone-public' => 'You are writing a |public phone note|.',
  5178. # ....
  5179. },
  5180. preferences: {
  5181. permission: ['admin.ui'],
  5182. },
  5183. frontend: true
  5184. )
  5185. Setting.create_if_not_exists(
  5186. title: __('S/MIME integration'),
  5187. name: 'smime_integration',
  5188. area: 'Integration::Switch',
  5189. description: __('Defines if S/MIME encryption is enabled or not.'),
  5190. options: {
  5191. form: [
  5192. {
  5193. display: '',
  5194. null: true,
  5195. name: 'smime_integration',
  5196. tag: 'boolean',
  5197. options: {
  5198. true => 'yes',
  5199. false => 'no',
  5200. },
  5201. },
  5202. ],
  5203. },
  5204. state: false,
  5205. preferences: {
  5206. prio: 1,
  5207. authentication: true,
  5208. permission: ['admin.integration'],
  5209. },
  5210. frontend: true
  5211. )
  5212. Setting.create_if_not_exists(
  5213. title: __('S/MIME config'),
  5214. name: 'smime_config',
  5215. area: 'Integration::SMIME',
  5216. description: __('Defines the S/MIME config.'),
  5217. options: {},
  5218. state: {},
  5219. preferences: {
  5220. prio: 2,
  5221. permission: ['admin.integration'],
  5222. },
  5223. frontend: true,
  5224. )
  5225. Setting.create_if_not_exists(
  5226. title: __('Authentication via %s'),
  5227. name: 'auth_sso',
  5228. area: 'Security::ThirdPartyAuthentication',
  5229. description: __('Enables button for user authentication via %s. The button will redirect to /auth/sso on user interaction.'),
  5230. options: {
  5231. form: [
  5232. {
  5233. display: '',
  5234. null: true,
  5235. name: 'auth_sso',
  5236. tag: 'boolean',
  5237. options: {
  5238. true => 'yes',
  5239. false => 'no',
  5240. },
  5241. },
  5242. ],
  5243. },
  5244. preferences: {
  5245. controller: 'SettingsAreaSwitch',
  5246. sub: {},
  5247. title_i18n: [__('SSO')],
  5248. description_i18n: [__('SSO')],
  5249. permission: ['admin.security'],
  5250. },
  5251. state: false,
  5252. frontend: true
  5253. )
  5254. Setting.create_if_not_exists(
  5255. title: __('Show calendar weeks in the picker of date/datetime fields'),
  5256. name: 'datepicker_show_calendar_weeks',
  5257. area: 'System::UI',
  5258. description: __('Defines if calendar weeks are shown in the picker of date/datetime fields to easily select the correct date.'),
  5259. options: {
  5260. form: [
  5261. {
  5262. display: '',
  5263. null: true,
  5264. name: 'datepicker_show_calendar_weeks',
  5265. tag: 'boolean',
  5266. options: {
  5267. true => 'yes',
  5268. false => 'no',
  5269. },
  5270. },
  5271. ],
  5272. },
  5273. state: false,
  5274. preferences: {
  5275. render: true,
  5276. prio: 4,
  5277. permission: ['admin.system'],
  5278. },
  5279. frontend: true
  5280. )