settings.rb 132 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007
  1. # Copyright (C) 2012-2022 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: __('New User Accounts'),
  984. name: 'user_create_account',
  985. area: 'Security::Base',
  986. description: __('Enables users to create their own account via web interface.'),
  987. options: {
  988. form: [
  989. {
  990. display: '',
  991. null: true,
  992. name: 'user_create_account',
  993. tag: 'boolean',
  994. options: {
  995. true => 'yes',
  996. false => 'no',
  997. },
  998. },
  999. ],
  1000. },
  1001. state: true,
  1002. preferences: {
  1003. prio: 10,
  1004. permission: ['admin.security'],
  1005. },
  1006. frontend: true
  1007. )
  1008. Setting.create_if_not_exists(
  1009. title: __('Lost Password'),
  1010. name: 'user_lost_password',
  1011. area: 'Security::Base',
  1012. description: __('Activates lost password feature for users.'),
  1013. options: {
  1014. form: [
  1015. {
  1016. display: '',
  1017. null: true,
  1018. name: 'user_lost_password',
  1019. tag: 'boolean',
  1020. options: {
  1021. true => 'yes',
  1022. false => 'no',
  1023. },
  1024. },
  1025. ],
  1026. },
  1027. state: true,
  1028. preferences: {
  1029. prio: 20,
  1030. permission: ['admin.security'],
  1031. },
  1032. frontend: true
  1033. )
  1034. options = [ { value: '0', name: 'disabled' }, { value: 1.hour.seconds, name: __('1 hour') }, { value: 2.hours.seconds, name: __('2 hours') }, { value: 1.day.seconds, name: __('1 day') }, { value: 7.days.seconds, name: __('1 week') }, { value: 14.days.seconds, name: __('2 weeks') }, { value: 21.days.seconds, name: __('3 weeks') }, { value: 28.days.seconds, name: __('4 weeks') } ]
  1035. Setting.create_if_not_exists(
  1036. title: __('Session Timeout'),
  1037. name: 'session_timeout',
  1038. area: 'Security::Base',
  1039. description: __('Defines the session timeout for inactivity of users. Based on the assigned permissions the highest timeout value will be used, otherwise the default.'),
  1040. options: {
  1041. form: [
  1042. {
  1043. display: __('Default'),
  1044. null: false,
  1045. name: 'default',
  1046. tag: 'select',
  1047. options: options,
  1048. translate: true,
  1049. },
  1050. {
  1051. display: __('admin'),
  1052. null: false,
  1053. name: 'admin',
  1054. tag: 'select',
  1055. options: options,
  1056. translate: true,
  1057. },
  1058. {
  1059. display: __('ticket.agent'),
  1060. null: false,
  1061. name: 'ticket.agent',
  1062. tag: 'select',
  1063. options: options,
  1064. translate: true,
  1065. },
  1066. {
  1067. display: __('ticket.customer'),
  1068. null: false,
  1069. name: 'ticket.customer',
  1070. tag: 'select',
  1071. options: options,
  1072. translate: true,
  1073. },
  1074. ],
  1075. },
  1076. preferences: {
  1077. prio: 30,
  1078. },
  1079. state: {
  1080. 'default' => 4.weeks.seconds,
  1081. 'admin' => 4.weeks.seconds,
  1082. 'ticket.agent' => 4.weeks.seconds,
  1083. 'ticket.customer' => 4.weeks.seconds,
  1084. },
  1085. frontend: true
  1086. )
  1087. Setting.create_if_not_exists(
  1088. title: __('User email for multiple users'),
  1089. name: 'user_email_multiple_use',
  1090. area: 'Model::User',
  1091. description: __('Allow using one email address for multiple users.'),
  1092. options: {
  1093. form: [
  1094. {
  1095. display: '',
  1096. null: true,
  1097. name: 'user_email_multiple_use',
  1098. tag: 'boolean',
  1099. options: {
  1100. true => 'yes',
  1101. false => 'no',
  1102. },
  1103. },
  1104. ],
  1105. },
  1106. state: false,
  1107. preferences: {
  1108. permission: ['admin'],
  1109. },
  1110. frontend: false
  1111. )
  1112. Setting.create_if_not_exists(
  1113. title: __('Authentication via %s'),
  1114. name: 'auth_internal',
  1115. area: 'Security::Authentication',
  1116. description: __('Enables user authentication via %s.'),
  1117. preferences: {
  1118. title_i18n: ['internal database'],
  1119. description_i18n: ['internal database'],
  1120. permission: ['admin.security'],
  1121. },
  1122. state: {
  1123. priority: 1,
  1124. adapter: 'Auth::Backend::Internal',
  1125. },
  1126. frontend: false
  1127. )
  1128. Setting.create_if_not_exists(
  1129. title: __('Authentication via %s'),
  1130. name: 'auth_developer',
  1131. area: 'Security::Authentication',
  1132. description: __('Enables user authentication via %s.'),
  1133. preferences: {
  1134. title_i18n: ['developer password'],
  1135. description_i18n: ['developer password'],
  1136. permission: ['admin.security'],
  1137. },
  1138. state: {
  1139. priority: 2,
  1140. adapter: 'Auth::Backend::Developer',
  1141. },
  1142. frontend: false
  1143. )
  1144. Setting.create_if_not_exists(
  1145. title: __('Authentication via %s'),
  1146. name: 'auth_ldap',
  1147. area: 'Security::Authentication',
  1148. description: __('Enables user authentication via %s.'),
  1149. preferences: {
  1150. title_i18n: ['LDAP'],
  1151. description_i18n: ['LDAP'],
  1152. permission: ['admin.security'],
  1153. },
  1154. state: {
  1155. priority: 3,
  1156. adapter: 'Auth::Backend::Ldap',
  1157. host: 'localhost',
  1158. port: 389,
  1159. bind_dn: 'cn=Manager,dc=example,dc=org',
  1160. bind_pw: 'example',
  1161. uid: 'mail',
  1162. base: 'dc=example,dc=org',
  1163. always_filter: '',
  1164. always_roles: %w[Admin Agent],
  1165. always_groups: ['Users'],
  1166. sync_params: {
  1167. firstname: 'sn',
  1168. lastname: 'givenName',
  1169. email: 'mail',
  1170. login: 'mail',
  1171. },
  1172. },
  1173. frontend: false
  1174. )
  1175. Setting.create_if_not_exists(
  1176. title: __('Automatic account link on initial logon'),
  1177. name: 'auth_third_party_auto_link_at_inital_login',
  1178. area: 'Security::ThirdPartyAuthentication',
  1179. 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.'),
  1180. options: {
  1181. form: [
  1182. {
  1183. display: '',
  1184. null: true,
  1185. name: 'auth_third_party_auto_link_at_inital_login',
  1186. tag: 'boolean',
  1187. options: {
  1188. true => 'yes',
  1189. false => 'no',
  1190. },
  1191. },
  1192. ],
  1193. },
  1194. preferences: {
  1195. permission: ['admin.security'],
  1196. prio: 10,
  1197. },
  1198. state: false,
  1199. frontend: false
  1200. )
  1201. Setting.create_if_not_exists(
  1202. title: __('Authentication via %s'),
  1203. name: 'auth_twitter',
  1204. area: 'Security::ThirdPartyAuthentication',
  1205. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1206. options: {
  1207. form: [
  1208. {
  1209. display: '',
  1210. null: true,
  1211. name: 'auth_twitter',
  1212. tag: 'boolean',
  1213. options: {
  1214. true => 'yes',
  1215. false => 'no',
  1216. },
  1217. },
  1218. ],
  1219. },
  1220. preferences: {
  1221. controller: 'SettingsAreaSwitch',
  1222. sub: ['auth_twitter_credentials'],
  1223. title_i18n: ['Twitter'],
  1224. description_i18n: ['Twitter', 'Twitter Developer Site', 'https://dev.twitter.com/apps'], # rubocop:disable Zammad/DetectTranslatableString
  1225. permission: ['admin.security'],
  1226. },
  1227. state: false,
  1228. frontend: true
  1229. )
  1230. Setting.create_if_not_exists(
  1231. title: __('Twitter App Credentials'),
  1232. name: 'auth_twitter_credentials',
  1233. area: 'Security::ThirdPartyAuthentication::Twitter',
  1234. description: __('App credentials for Twitter.'),
  1235. options: {
  1236. form: [
  1237. {
  1238. display: __('Twitter Key'),
  1239. null: true,
  1240. name: 'key',
  1241. tag: 'input',
  1242. },
  1243. {
  1244. display: __('Twitter Secret'),
  1245. null: true,
  1246. name: 'secret',
  1247. tag: 'input',
  1248. },
  1249. {
  1250. display: __('Your callback URL'),
  1251. null: true,
  1252. name: 'callback_url',
  1253. tag: 'auth_provider',
  1254. provider: 'auth_twitter',
  1255. },
  1256. ],
  1257. },
  1258. state: {},
  1259. preferences: {
  1260. permission: ['admin.security'],
  1261. },
  1262. frontend: false
  1263. )
  1264. Setting.create_if_not_exists(
  1265. title: __('Authentication via %s'),
  1266. name: 'auth_facebook',
  1267. area: 'Security::ThirdPartyAuthentication',
  1268. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1269. options: {
  1270. form: [
  1271. {
  1272. display: '',
  1273. null: true,
  1274. name: 'auth_facebook',
  1275. tag: 'boolean',
  1276. options: {
  1277. true => 'yes',
  1278. false => 'no',
  1279. },
  1280. },
  1281. ],
  1282. },
  1283. preferences: {
  1284. controller: 'SettingsAreaSwitch',
  1285. sub: ['auth_facebook_credentials'],
  1286. title_i18n: ['Facebook'],
  1287. description_i18n: ['Facebook', 'Facebook Developer Site', 'https://developers.facebook.com/apps/'], # rubocop:disable Zammad/DetectTranslatableString
  1288. permission: ['admin.security'],
  1289. },
  1290. state: false,
  1291. frontend: true
  1292. )
  1293. Setting.create_if_not_exists(
  1294. title: __('Facebook App Credentials'),
  1295. name: 'auth_facebook_credentials',
  1296. area: 'Security::ThirdPartyAuthentication::Facebook',
  1297. description: __('App credentials for Facebook.'),
  1298. options: {
  1299. form: [
  1300. {
  1301. display: __('App ID'),
  1302. null: true,
  1303. name: 'app_id',
  1304. tag: 'input',
  1305. },
  1306. {
  1307. display: __('App Secret'),
  1308. null: true,
  1309. name: 'app_secret',
  1310. tag: 'input',
  1311. },
  1312. {
  1313. display: __('Your callback URL'),
  1314. null: true,
  1315. name: 'callback_url',
  1316. tag: 'auth_provider',
  1317. provider: 'auth_facebook',
  1318. },
  1319. ],
  1320. },
  1321. state: {},
  1322. preferences: {
  1323. permission: ['admin.security'],
  1324. },
  1325. frontend: false
  1326. )
  1327. Setting.create_if_not_exists(
  1328. title: __('Authentication via %s'),
  1329. name: 'auth_google_oauth2',
  1330. area: 'Security::ThirdPartyAuthentication',
  1331. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1332. options: {
  1333. form: [
  1334. {
  1335. display: '',
  1336. null: true,
  1337. name: 'auth_google_oauth2',
  1338. tag: 'boolean',
  1339. options: {
  1340. true => 'yes',
  1341. false => 'no',
  1342. },
  1343. },
  1344. ],
  1345. },
  1346. preferences: {
  1347. controller: 'SettingsAreaSwitch',
  1348. sub: ['auth_google_oauth2_credentials'],
  1349. title_i18n: ['Google'],
  1350. description_i18n: ['Google', 'Google API Console Site', 'https://console.cloud.google.com/apis/credentials'], # rubocop:disable Zammad/DetectTranslatableString
  1351. permission: ['admin.security'],
  1352. },
  1353. state: false,
  1354. frontend: true
  1355. )
  1356. Setting.create_if_not_exists(
  1357. title: __('Google App Credentials'),
  1358. name: 'auth_google_oauth2_credentials',
  1359. area: 'Security::ThirdPartyAuthentication::Google',
  1360. description: __('Enables user authentication via Google.'),
  1361. options: {
  1362. form: [
  1363. {
  1364. display: __('Client ID'),
  1365. null: true,
  1366. name: 'client_id',
  1367. tag: 'input',
  1368. },
  1369. {
  1370. display: __('Client Secret'),
  1371. null: true,
  1372. name: 'client_secret',
  1373. tag: 'input',
  1374. },
  1375. {
  1376. display: __('Your callback URL'),
  1377. null: true,
  1378. name: 'callback_url',
  1379. tag: 'auth_provider',
  1380. provider: 'auth_google_oauth2',
  1381. },
  1382. ],
  1383. },
  1384. state: {},
  1385. preferences: {
  1386. permission: ['admin.security'],
  1387. },
  1388. frontend: false
  1389. )
  1390. Setting.create_if_not_exists(
  1391. title: __('Authentication via %s'),
  1392. name: 'auth_linkedin',
  1393. area: 'Security::ThirdPartyAuthentication',
  1394. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1395. options: {
  1396. form: [
  1397. {
  1398. display: '',
  1399. null: true,
  1400. name: 'auth_linkedin',
  1401. tag: 'boolean',
  1402. options: {
  1403. true => 'yes',
  1404. false => 'no',
  1405. },
  1406. },
  1407. ],
  1408. },
  1409. preferences: {
  1410. controller: 'SettingsAreaSwitch',
  1411. sub: ['auth_linkedin_credentials'],
  1412. title_i18n: ['LinkedIn'],
  1413. description_i18n: ['LinkedIn', 'LinkedIn Developer Site', 'https://www.linkedin.com/developer/apps'], # rubocop:disable Zammad/DetectTranslatableString
  1414. permission: ['admin.security'],
  1415. },
  1416. state: false,
  1417. frontend: true
  1418. )
  1419. Setting.create_if_not_exists(
  1420. title: __('LinkedIn App Credentials'),
  1421. name: 'auth_linkedin_credentials',
  1422. area: 'Security::ThirdPartyAuthentication::Linkedin',
  1423. description: __('Enables user authentication via LinkedIn.'),
  1424. options: {
  1425. form: [
  1426. {
  1427. display: __('App ID'),
  1428. null: true,
  1429. name: 'app_id',
  1430. tag: 'input',
  1431. },
  1432. {
  1433. display: __('App Secret'),
  1434. null: true,
  1435. name: 'app_secret',
  1436. tag: 'input',
  1437. },
  1438. {
  1439. display: __('Your callback URL'),
  1440. null: true,
  1441. name: 'callback_url',
  1442. tag: 'auth_provider',
  1443. provider: 'auth_linkedin',
  1444. },
  1445. ],
  1446. },
  1447. state: {},
  1448. preferences: {
  1449. permission: ['admin.security'],
  1450. },
  1451. frontend: false
  1452. )
  1453. Setting.create_if_not_exists(
  1454. title: __('Authentication via %s'),
  1455. name: 'auth_github',
  1456. area: 'Security::ThirdPartyAuthentication',
  1457. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1458. options: {
  1459. form: [
  1460. {
  1461. display: '',
  1462. null: true,
  1463. name: 'auth_github',
  1464. tag: 'boolean',
  1465. options: {
  1466. true => 'yes',
  1467. false => 'no',
  1468. },
  1469. },
  1470. ],
  1471. },
  1472. preferences: {
  1473. controller: 'SettingsAreaSwitch',
  1474. sub: ['auth_github_credentials'],
  1475. title_i18n: ['Github'],
  1476. description_i18n: ['Github', 'GitHub OAuth Applications', 'https://github.com/settings/applications'], # rubocop:disable Zammad/DetectTranslatableString
  1477. permission: ['admin.security'],
  1478. },
  1479. state: false,
  1480. frontend: true
  1481. )
  1482. Setting.create_if_not_exists(
  1483. title: __('GitHub App Credentials'),
  1484. name: 'auth_github_credentials',
  1485. area: 'Security::ThirdPartyAuthentication::Github',
  1486. description: __('Enables user authentication via GitHub.'),
  1487. options: {
  1488. form: [
  1489. {
  1490. display: __('App ID'),
  1491. null: true,
  1492. name: 'app_id',
  1493. tag: 'input',
  1494. },
  1495. {
  1496. display: __('App Secret'),
  1497. null: true,
  1498. name: 'app_secret',
  1499. tag: 'input',
  1500. },
  1501. {
  1502. display: __('Your callback URL'),
  1503. null: true,
  1504. name: 'callback_url',
  1505. tag: 'auth_provider',
  1506. provider: 'auth_github',
  1507. },
  1508. ],
  1509. },
  1510. state: {},
  1511. preferences: {
  1512. permission: ['admin.security'],
  1513. },
  1514. frontend: false
  1515. )
  1516. Setting.create_if_not_exists(
  1517. title: __('Authentication via %s'),
  1518. name: 'auth_gitlab',
  1519. area: 'Security::ThirdPartyAuthentication',
  1520. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1521. options: {
  1522. form: [
  1523. {
  1524. display: '',
  1525. null: true,
  1526. name: 'auth_gitlab',
  1527. tag: 'boolean',
  1528. options: {
  1529. true => 'yes',
  1530. false => 'no',
  1531. },
  1532. },
  1533. ],
  1534. },
  1535. preferences: {
  1536. controller: 'SettingsAreaSwitch',
  1537. sub: ['auth_gitlab_credentials'],
  1538. title_i18n: ['GitLab'],
  1539. description_i18n: ['GitLab', 'GitLab Applications', 'https://your-gitlab-host/admin/applications'], # rubocop:disable Zammad/DetectTranslatableString
  1540. permission: ['admin.security'],
  1541. },
  1542. state: false,
  1543. frontend: true
  1544. )
  1545. Setting.create_if_not_exists(
  1546. title: __('GitLab App Credentials'),
  1547. name: 'auth_gitlab_credentials',
  1548. area: 'Security::ThirdPartyAuthentication::GitLab',
  1549. description: __('Enables user authentication via GitLab.'),
  1550. options: {
  1551. form: [
  1552. {
  1553. display: __('App ID'),
  1554. null: true,
  1555. name: 'app_id',
  1556. tag: 'input',
  1557. },
  1558. {
  1559. display: __('App Secret'),
  1560. null: true,
  1561. name: 'app_secret',
  1562. tag: 'input',
  1563. },
  1564. {
  1565. display: __('Site'),
  1566. null: true,
  1567. name: 'site',
  1568. tag: 'input',
  1569. placeholder: 'https://gitlab.YOURDOMAIN.com/api/v4/',
  1570. },
  1571. {
  1572. display: __('Your callback URL'),
  1573. null: true,
  1574. name: 'callback_url',
  1575. tag: 'auth_provider',
  1576. provider: 'auth_gitlab',
  1577. },
  1578. ],
  1579. },
  1580. state: {},
  1581. preferences: {
  1582. permission: ['admin.security'],
  1583. },
  1584. frontend: false
  1585. )
  1586. Setting.create_if_not_exists(
  1587. title: __('Authentication via %s'),
  1588. name: 'auth_microsoft_office365',
  1589. area: 'Security::ThirdPartyAuthentication',
  1590. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1591. options: {
  1592. form: [
  1593. {
  1594. display: '',
  1595. null: true,
  1596. name: 'auth_microsoft_office365',
  1597. tag: 'boolean',
  1598. options: {
  1599. true => 'yes',
  1600. false => 'no',
  1601. },
  1602. },
  1603. ],
  1604. },
  1605. preferences: {
  1606. controller: 'SettingsAreaSwitch',
  1607. sub: ['auth_microsoft_office365_credentials'],
  1608. title_i18n: ['Microsoft'],
  1609. description_i18n: ['Microsoft', __('Microsoft Application Registration Portal'), 'https://portal.azure.com'],
  1610. permission: ['admin.security'],
  1611. },
  1612. state: false,
  1613. frontend: true
  1614. )
  1615. Setting.create_if_not_exists(
  1616. title: __('Microsoft 365 App Credentials'),
  1617. name: 'auth_microsoft_office365_credentials',
  1618. area: 'Security::ThirdPartyAuthentication::Office365',
  1619. description: __('Enables user authentication via Microsoft 365.'),
  1620. options: {
  1621. form: [
  1622. {
  1623. display: __('App ID'),
  1624. null: true,
  1625. name: 'app_id',
  1626. tag: 'input',
  1627. },
  1628. {
  1629. display: __('App Secret'),
  1630. null: true,
  1631. name: 'app_secret',
  1632. tag: 'input',
  1633. },
  1634. {
  1635. display: __('App Tenant ID'),
  1636. null: true,
  1637. name: 'app_tenant',
  1638. tag: 'input',
  1639. placeholder: 'common',
  1640. },
  1641. {
  1642. display: __('Your callback URL'),
  1643. null: true,
  1644. name: 'callback_url',
  1645. tag: 'auth_provider',
  1646. provider: 'auth_microsoft_office365',
  1647. },
  1648. ],
  1649. },
  1650. state: {},
  1651. preferences: {
  1652. permission: ['admin.security'],
  1653. },
  1654. frontend: false
  1655. )
  1656. Setting.create_if_not_exists(
  1657. title: __('Authentication via %s'),
  1658. name: 'auth_weibo',
  1659. area: 'Security::ThirdPartyAuthentication',
  1660. description: __('Enables user authentication via %s. Register your app first at [%s](%s).'),
  1661. options: {
  1662. form: [
  1663. {
  1664. display: '',
  1665. null: true,
  1666. name: 'auth_weibo',
  1667. tag: 'boolean',
  1668. options: {
  1669. true => 'yes',
  1670. false => 'no',
  1671. },
  1672. },
  1673. ],
  1674. },
  1675. preferences: {
  1676. controller: 'SettingsAreaSwitch',
  1677. sub: ['auth_weibo_credentials'],
  1678. title_i18n: ['Weibo'],
  1679. description_i18n: ['Sina Weibo', 'Sina Weibo Open Portal', 'http://open.weibo.com'], # rubocop:disable Zammad/DetectTranslatableString
  1680. permission: ['admin.security'],
  1681. },
  1682. state: false,
  1683. frontend: true
  1684. )
  1685. Setting.create_if_not_exists(
  1686. title: __('Weibo App Credentials'),
  1687. name: 'auth_weibo_credentials',
  1688. area: 'Security::ThirdPartyAuthentication::Weibo',
  1689. description: __('Enables user authentication via Weibo.'),
  1690. options: {
  1691. form: [
  1692. {
  1693. display: __('App ID'),
  1694. null: true,
  1695. name: 'client_id',
  1696. tag: 'input',
  1697. },
  1698. {
  1699. display: __('App Secret'),
  1700. null: true,
  1701. name: 'client_secret',
  1702. tag: 'input',
  1703. },
  1704. {
  1705. display: __('Your callback URL'),
  1706. null: true,
  1707. name: 'callback_url',
  1708. tag: 'auth_provider',
  1709. provider: 'auth_weibo',
  1710. },
  1711. ],
  1712. },
  1713. state: {},
  1714. preferences: {
  1715. permission: ['admin.security'],
  1716. },
  1717. frontend: false
  1718. )
  1719. Setting.create_if_not_exists(
  1720. title: __('Authentication via %s'),
  1721. name: 'auth_saml',
  1722. area: 'Security::ThirdPartyAuthentication',
  1723. description: __('Enables user authentication via %s.'),
  1724. options: {
  1725. form: [
  1726. {
  1727. display: '',
  1728. null: true,
  1729. name: 'auth_saml',
  1730. tag: 'boolean',
  1731. options: {
  1732. true => 'yes',
  1733. false => 'no',
  1734. },
  1735. },
  1736. ],
  1737. },
  1738. preferences: {
  1739. controller: 'SettingsAreaSwitch',
  1740. sub: ['auth_saml_credentials'],
  1741. title_i18n: ['SAML'],
  1742. description_i18n: ['SAML'],
  1743. permission: ['admin.security'],
  1744. },
  1745. state: false,
  1746. frontend: true
  1747. )
  1748. Setting.create_if_not_exists(
  1749. title: __('SAML App Credentials'),
  1750. name: 'auth_saml_credentials',
  1751. area: 'Security::ThirdPartyAuthentication::SAML',
  1752. description: __('Enables user authentication via SAML.'),
  1753. options: {
  1754. form: [
  1755. {
  1756. display: __('IDP SSO target URL'),
  1757. null: true,
  1758. name: 'idp_sso_target_url',
  1759. tag: 'input',
  1760. placeholder: 'https://capriza.github.io/samling/samling.html',
  1761. },
  1762. {
  1763. display: __('IDP certificate'),
  1764. null: true,
  1765. name: 'idp_cert',
  1766. tag: 'input',
  1767. placeholder: '-----BEGIN CERTIFICATE-----\n...-----END CERTIFICATE-----',
  1768. },
  1769. {
  1770. display: __('IDP certificate fingerprint'),
  1771. null: true,
  1772. name: 'idp_cert_fingerprint',
  1773. tag: 'input',
  1774. placeholder: 'E7:91:B2:E1:...',
  1775. },
  1776. {
  1777. display: __('Name Identifier Format'),
  1778. null: true,
  1779. name: 'name_identifier_format',
  1780. tag: 'input',
  1781. placeholder: 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress',
  1782. },
  1783. {
  1784. display: __('Your callback URL'),
  1785. null: true,
  1786. name: 'callback_url',
  1787. tag: 'auth_provider',
  1788. provider: 'auth_saml',
  1789. },
  1790. ],
  1791. },
  1792. state: {},
  1793. preferences: {
  1794. permission: ['admin.security'],
  1795. },
  1796. frontend: false
  1797. )
  1798. Setting.create_if_not_exists(
  1799. title: __('Minimum length'),
  1800. name: 'password_min_size',
  1801. area: 'Security::Password',
  1802. description: __('Password needs to have at least a minimal number of characters.'),
  1803. options: {
  1804. form: [
  1805. {
  1806. display: '',
  1807. null: true,
  1808. name: 'password_min_size',
  1809. tag: 'select',
  1810. options: {
  1811. 4 => ' 4',
  1812. 5 => ' 5',
  1813. 6 => ' 6',
  1814. 7 => ' 7',
  1815. 8 => ' 8',
  1816. 9 => ' 9',
  1817. 10 => '10',
  1818. 11 => '11',
  1819. 12 => '12',
  1820. 13 => '13',
  1821. 14 => '14',
  1822. 15 => '15',
  1823. 16 => '16',
  1824. 17 => '17',
  1825. 18 => '18',
  1826. 19 => '19',
  1827. 20 => '20',
  1828. },
  1829. },
  1830. ],
  1831. },
  1832. state: 10,
  1833. preferences: {
  1834. permission: ['admin.security'],
  1835. },
  1836. frontend: false
  1837. )
  1838. Setting.create_if_not_exists(
  1839. title: __('2 lower case and 2 upper case characters'),
  1840. name: 'password_min_2_lower_2_upper_characters',
  1841. area: 'Security::Password',
  1842. description: __('Password needs to contain 2 lower case and 2 upper case characters.'),
  1843. options: {
  1844. form: [
  1845. {
  1846. display: '',
  1847. null: true,
  1848. name: 'password_min_2_lower_2_upper_characters',
  1849. tag: 'select',
  1850. options: {
  1851. 1 => 'yes',
  1852. 0 => 'no',
  1853. },
  1854. translate: true,
  1855. },
  1856. ],
  1857. },
  1858. state: 1,
  1859. preferences: {
  1860. permission: ['admin.security'],
  1861. },
  1862. frontend: false
  1863. )
  1864. Setting.create_if_not_exists(
  1865. title: __('Digit required'),
  1866. name: 'password_need_digit',
  1867. area: 'Security::Password',
  1868. description: __('Password needs to contain at least one digit.'),
  1869. options: {
  1870. form: [
  1871. {
  1872. display: __('Needed'),
  1873. null: true,
  1874. name: 'password_need_digit',
  1875. tag: 'select',
  1876. options: {
  1877. 1 => 'yes',
  1878. 0 => 'no',
  1879. },
  1880. translate: true,
  1881. },
  1882. ],
  1883. },
  1884. state: 1,
  1885. preferences: {
  1886. permission: ['admin.security'],
  1887. },
  1888. frontend: false
  1889. )
  1890. Setting.create_if_not_exists(
  1891. title: __('Special character required'),
  1892. name: 'password_need_special_character',
  1893. area: 'Security::Password',
  1894. description: __('Password needs to contain at least one special character.'),
  1895. options: {
  1896. form: [
  1897. {
  1898. display: __('Needed'),
  1899. null: true,
  1900. name: 'password_need_special_character',
  1901. tag: 'select',
  1902. options: {
  1903. 1 => 'yes',
  1904. 0 => 'no',
  1905. },
  1906. translate: true,
  1907. },
  1908. ],
  1909. },
  1910. state: 0,
  1911. preferences: {
  1912. permission: ['admin.security'],
  1913. },
  1914. frontend: false
  1915. )
  1916. Setting.create_if_not_exists(
  1917. title: __('Maximum failed logins'),
  1918. name: 'password_max_login_failed',
  1919. area: 'Security::Password',
  1920. description: __('Defines after how many failed logins accounts will be deactivated.'),
  1921. options: {
  1922. form: [
  1923. {
  1924. display: '',
  1925. null: true,
  1926. name: 'password_max_login_failed',
  1927. tag: 'select',
  1928. options: {
  1929. 4 => ' 4',
  1930. 5 => ' 5',
  1931. 6 => ' 6',
  1932. 7 => ' 7',
  1933. 8 => ' 8',
  1934. 9 => ' 9',
  1935. 10 => '10',
  1936. 11 => '11',
  1937. 13 => '13',
  1938. 14 => '14',
  1939. 15 => '15',
  1940. 16 => '16',
  1941. 17 => '17',
  1942. 18 => '18',
  1943. 19 => '19',
  1944. 20 => '20',
  1945. },
  1946. },
  1947. ],
  1948. },
  1949. state: 5,
  1950. preferences: {
  1951. authentication: true,
  1952. permission: ['admin.security'],
  1953. },
  1954. frontend: true
  1955. )
  1956. Setting.create_if_not_exists(
  1957. title: __('Ticket Hook'),
  1958. name: 'ticket_hook',
  1959. area: 'Ticket::Base',
  1960. description: __('The identifier for a ticket, e.g. Ticket#, Call#, MyTicket#. The default is Ticket#.'),
  1961. options: {
  1962. form: [
  1963. {
  1964. display: '',
  1965. null: false,
  1966. name: 'ticket_hook',
  1967. tag: 'input',
  1968. },
  1969. ],
  1970. },
  1971. preferences: {
  1972. render: true,
  1973. placeholder: true,
  1974. authentication: true,
  1975. permission: ['admin.ticket'],
  1976. },
  1977. state: 'Ticket#',
  1978. frontend: true
  1979. )
  1980. Setting.create_if_not_exists(
  1981. title: __('Ticket Hook Divider'),
  1982. name: 'ticket_hook_divider',
  1983. area: 'Ticket::Base::Shadow',
  1984. description: __('The divider between TicketHook and ticket number. E. g. \': \'.'),
  1985. options: {
  1986. form: [
  1987. {
  1988. display: '',
  1989. null: true,
  1990. name: 'ticket_hook_divider',
  1991. tag: 'input',
  1992. },
  1993. ],
  1994. },
  1995. state: '',
  1996. preferences: {
  1997. permission: ['admin.ticket'],
  1998. },
  1999. frontend: false
  2000. )
  2001. Setting.create_if_not_exists(
  2002. title: __('Ticket Hook Position'),
  2003. name: 'ticket_hook_position',
  2004. area: 'Ticket::Base',
  2005. description: __("The format of the subject.
  2006. * **Right** means **Some Subject [Ticket#12345]**
  2007. * **Left** means **[Ticket#12345] Some Subject**
  2008. * **None** means **Some Subject** (without ticket number). In the last case you should enable *postmaster_follow_up_search_in* to recognize follow-ups based on email headers and/or body."),
  2009. options: {
  2010. form: [
  2011. {
  2012. display: '',
  2013. null: true,
  2014. name: 'ticket_hook_position',
  2015. tag: 'select',
  2016. translate: true,
  2017. options: {
  2018. 'left' => __('left'),
  2019. 'right' => __('right'),
  2020. 'none' => __('none'),
  2021. },
  2022. },
  2023. ],
  2024. },
  2025. state: 'right',
  2026. preferences: {
  2027. controller: 'SettingsAreaTicketHookPosition',
  2028. permission: ['admin.ticket'],
  2029. },
  2030. frontend: false
  2031. )
  2032. Setting.create_if_not_exists(
  2033. title: __('Ticket Last Contact Behaviour'),
  2034. name: 'ticket_last_contact_behaviour',
  2035. area: 'Ticket::Base',
  2036. description: __('Defines how the last customer contact time of tickets should be calculated.'),
  2037. options: {
  2038. form: [
  2039. {
  2040. display: '',
  2041. null: true,
  2042. name: 'ticket_last_contact_behaviour',
  2043. tag: 'select',
  2044. translate: true,
  2045. options: {
  2046. 'based_on_customer_reaction' => __('Use the time of the very last customer article.'),
  2047. 'check_if_agent_already_replied' => __('Use the start time of the last customer thread (which may consist of multiple articles).'),
  2048. },
  2049. },
  2050. ],
  2051. },
  2052. state: 'check_if_agent_already_replied',
  2053. preferences: {
  2054. permission: ['admin.ticket'],
  2055. },
  2056. frontend: false
  2057. )
  2058. Setting.create_if_not_exists(
  2059. title: __('Ticket Number Format'),
  2060. name: 'ticket_number',
  2061. area: 'Ticket::Number',
  2062. description: __("Selects the ticket number generator module.
  2063. * **Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  2064. * 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)."),
  2065. options: {
  2066. form: [
  2067. {
  2068. display: '',
  2069. null: true,
  2070. name: 'ticket_number',
  2071. tag: 'select',
  2072. translate: true,
  2073. options: {
  2074. 'Ticket::Number::Increment' => __('Increment (SystemID.Counter)'),
  2075. 'Ticket::Number::Date' => __('Date (Year.Month.Day.SystemID.Counter)'),
  2076. },
  2077. },
  2078. ],
  2079. },
  2080. state: 'Ticket::Number::Increment',
  2081. preferences: {
  2082. settings_included: %w[ticket_number_increment ticket_number_date],
  2083. controller: 'SettingsAreaTicketNumber',
  2084. permission: ['admin.ticket'],
  2085. },
  2086. frontend: false
  2087. )
  2088. Setting.create_if_not_exists(
  2089. title: __('Ticket Number Increment'),
  2090. name: 'ticket_number_increment',
  2091. area: 'Ticket::Number',
  2092. description: '-',
  2093. options: {
  2094. form: [
  2095. {
  2096. display: __('Checksum'),
  2097. null: true,
  2098. name: 'checksum',
  2099. tag: 'boolean',
  2100. options: {
  2101. true => 'yes',
  2102. false => 'no',
  2103. },
  2104. },
  2105. {
  2106. display: __('Min. size of number'),
  2107. null: true,
  2108. name: 'min_size',
  2109. tag: 'select',
  2110. options: {
  2111. 1 => ' 1',
  2112. 2 => ' 2',
  2113. 3 => ' 3',
  2114. 4 => ' 4',
  2115. 5 => ' 5',
  2116. 6 => ' 6',
  2117. 7 => ' 7',
  2118. 8 => ' 8',
  2119. 9 => ' 9',
  2120. 10 => '10',
  2121. 11 => '11',
  2122. 12 => '12',
  2123. 13 => '13',
  2124. 14 => '14',
  2125. 15 => '15',
  2126. 16 => '16',
  2127. 17 => '17',
  2128. 18 => '18',
  2129. 19 => '19',
  2130. 20 => '20',
  2131. },
  2132. },
  2133. ],
  2134. },
  2135. state: {
  2136. checksum: false,
  2137. min_size: 5,
  2138. },
  2139. preferences: {
  2140. permission: ['admin.ticket'],
  2141. hidden: true,
  2142. },
  2143. frontend: false
  2144. )
  2145. Setting.create_if_not_exists(
  2146. title: __('Ticket Number Increment Date'),
  2147. name: 'ticket_number_date',
  2148. area: 'Ticket::Number',
  2149. description: '-',
  2150. options: {
  2151. form: [
  2152. {
  2153. display: __('Checksum'),
  2154. null: true,
  2155. name: 'checksum',
  2156. tag: 'boolean',
  2157. options: {
  2158. true => 'yes',
  2159. false => 'no',
  2160. },
  2161. },
  2162. ],
  2163. },
  2164. state: {
  2165. checksum: false
  2166. },
  2167. preferences: {
  2168. permission: ['admin.ticket'],
  2169. hidden: true,
  2170. },
  2171. frontend: false
  2172. )
  2173. Setting.create_if_not_exists(
  2174. title: __('Auto Assignment'),
  2175. name: 'ticket_auto_assignment',
  2176. area: 'Web::Base',
  2177. description: __('Enable ticket auto assignment.'),
  2178. options: {
  2179. form: [
  2180. {
  2181. display: '',
  2182. null: true,
  2183. name: 'ticket_auto_assignment',
  2184. tag: 'boolean',
  2185. options: {
  2186. true => 'yes',
  2187. false => 'no',
  2188. },
  2189. },
  2190. ],
  2191. },
  2192. preferences: {
  2193. authentication: true,
  2194. permission: ['admin.ticket_auto_assignment'],
  2195. },
  2196. state: false,
  2197. frontend: true
  2198. )
  2199. Setting.create_if_not_exists(
  2200. title: __('Time Accounting Selector'),
  2201. name: 'ticket_auto_assignment_selector',
  2202. area: 'Web::Base',
  2203. description: __('Enable auto assignment for following matching tickets.'),
  2204. options: {
  2205. form: [
  2206. {},
  2207. ],
  2208. },
  2209. preferences: {
  2210. authentication: true,
  2211. permission: ['admin.ticket_auto_assignment'],
  2212. },
  2213. state: { condition: { 'ticket.state_id' => { operator: 'is', value: Ticket::State.by_category(:work_on).pluck(:id) } } },
  2214. frontend: true
  2215. )
  2216. Setting.create_or_update(
  2217. title: __('Time Accounting Selector'),
  2218. name: 'ticket_auto_assignment_user_ids_ignore',
  2219. area: 'Web::Base',
  2220. description: __('Define an exception of "automatic assignment" for certain users (e.g. executives).'),
  2221. options: {
  2222. form: [
  2223. {},
  2224. ],
  2225. },
  2226. preferences: {
  2227. authentication: true,
  2228. permission: ['admin.ticket_auto_assignment'],
  2229. },
  2230. state: [],
  2231. frontend: true
  2232. )
  2233. Setting.create_if_not_exists(
  2234. title: __('Ticket Number ignore system_id'),
  2235. name: 'ticket_number_ignore_system_id',
  2236. area: 'Ticket::Core',
  2237. description: '-',
  2238. options: {
  2239. form: [
  2240. {
  2241. display: __('Ignore system_id'),
  2242. null: true,
  2243. name: 'ticket_number_ignore_system_id',
  2244. tag: 'boolean',
  2245. options: {
  2246. true => 'yes',
  2247. false => 'no',
  2248. },
  2249. },
  2250. ],
  2251. },
  2252. state: false,
  2253. preferences: {
  2254. permission: ['admin.ticket'],
  2255. hidden: true,
  2256. },
  2257. frontend: false
  2258. )
  2259. Setting.create_if_not_exists(
  2260. title: __('Recursive Ticket Triggers'),
  2261. name: 'ticket_trigger_recursive',
  2262. area: 'Ticket::Core',
  2263. description: __('Activate the recursive processing of ticket triggers.'),
  2264. options: {
  2265. form: [
  2266. {
  2267. display: __('Recursive Ticket Triggers'),
  2268. null: true,
  2269. name: 'ticket_trigger_recursive',
  2270. tag: 'boolean',
  2271. options: {
  2272. true => 'yes',
  2273. false => 'no',
  2274. },
  2275. },
  2276. ],
  2277. },
  2278. state: false,
  2279. preferences: {
  2280. permission: ['admin.ticket'],
  2281. hidden: true,
  2282. },
  2283. frontend: false
  2284. )
  2285. Setting.create_if_not_exists(
  2286. title: __('Recursive Ticket Triggers Loop Max.'),
  2287. name: 'ticket_trigger_recursive_max_loop',
  2288. area: 'Ticket::Core',
  2289. description: __('Maximum number of recursively executed triggers.'),
  2290. options: {
  2291. form: [
  2292. {
  2293. display: __('Recursive Ticket Triggers'),
  2294. null: true,
  2295. name: 'ticket_trigger_recursive_max_loop',
  2296. tag: 'select',
  2297. options: {
  2298. 1 => ' 1',
  2299. 2 => ' 2',
  2300. 3 => ' 3',
  2301. 4 => ' 4',
  2302. 5 => ' 5',
  2303. 6 => ' 6',
  2304. 7 => ' 7',
  2305. 8 => ' 8',
  2306. 9 => ' 9',
  2307. 10 => '10',
  2308. 11 => '11',
  2309. 12 => '12',
  2310. 13 => '13',
  2311. 14 => '14',
  2312. 15 => '15',
  2313. 16 => '16',
  2314. 17 => '17',
  2315. 18 => '18',
  2316. 19 => '19',
  2317. 20 => '20',
  2318. },
  2319. },
  2320. ],
  2321. },
  2322. state: 10,
  2323. preferences: {
  2324. permission: ['admin.ticket'],
  2325. hidden: true,
  2326. },
  2327. frontend: false
  2328. )
  2329. Setting.create_if_not_exists(
  2330. title: __('Enable Ticket creation'),
  2331. name: 'customer_ticket_create',
  2332. area: 'CustomerWeb::Base',
  2333. description: __('Defines if a customer can create tickets via the web interface.'),
  2334. options: {
  2335. form: [
  2336. {
  2337. display: '',
  2338. null: true,
  2339. name: 'customer_ticket_create',
  2340. tag: 'boolean',
  2341. options: {
  2342. true => 'yes',
  2343. false => 'no',
  2344. },
  2345. },
  2346. ],
  2347. },
  2348. state: true,
  2349. preferences: {
  2350. authentication: true,
  2351. permission: ['admin.channel_web'],
  2352. },
  2353. frontend: true
  2354. )
  2355. Setting.create_if_not_exists(
  2356. title: __('Group selection for Ticket creation'),
  2357. name: 'customer_ticket_create_group_ids',
  2358. area: 'CustomerWeb::Base',
  2359. description: __('Defines groups for which a customer can create tickets via web interface. "-" means all groups are available.'),
  2360. options: {
  2361. form: [
  2362. {
  2363. display: '',
  2364. null: true,
  2365. name: 'group_ids',
  2366. tag: 'select',
  2367. multiple: true,
  2368. nulloption: true,
  2369. relation: 'Group',
  2370. },
  2371. ],
  2372. },
  2373. state: '',
  2374. preferences: {
  2375. authentication: true,
  2376. permission: ['admin.channel_web'],
  2377. },
  2378. frontend: true
  2379. )
  2380. Setting.create_if_not_exists(
  2381. title: __('Tab behaviour after ticket action'),
  2382. name: 'ticket_secondary_action',
  2383. area: 'CustomerWeb::Base',
  2384. description: __('Defines the tab behaviour after a ticket action.'),
  2385. options: {
  2386. form: [
  2387. {
  2388. display: '',
  2389. null: true,
  2390. name: 'ticket_secondary_action',
  2391. tag: 'boolean',
  2392. options: {
  2393. 'closeTab' => __('Close tab'),
  2394. 'closeTabOnTicketClose' => __('Close tab on ticket close'),
  2395. 'closeNextInOverview' => __('Next in overview'),
  2396. 'stayOnTab' => __('Stay on tab'),
  2397. },
  2398. },
  2399. ],
  2400. },
  2401. state: 'stayOnTab',
  2402. preferences: {
  2403. authentication: true,
  2404. permission: ['admin.channel_web'],
  2405. },
  2406. frontend: true
  2407. )
  2408. Setting.create_if_not_exists(
  2409. title: __('Enable Ticket creation'),
  2410. name: 'form_ticket_create',
  2411. area: 'Form::Base',
  2412. description: __('Defines if tickets can be created via web form.'),
  2413. options: {
  2414. form: [
  2415. {
  2416. display: '',
  2417. null: true,
  2418. name: 'form_ticket_create',
  2419. tag: 'boolean',
  2420. options: {
  2421. true => 'yes',
  2422. false => 'no',
  2423. },
  2424. },
  2425. ],
  2426. },
  2427. state: false,
  2428. preferences: {
  2429. permission: ['admin.channel_formular'],
  2430. },
  2431. frontend: false,
  2432. )
  2433. group = Group.where(active: true).first
  2434. if !group
  2435. group = Group.first
  2436. end
  2437. group_id = 1
  2438. if group
  2439. group_id = group.id
  2440. end
  2441. Setting.create_if_not_exists(
  2442. title: __('Group selection for ticket creation'),
  2443. name: 'form_ticket_create_group_id',
  2444. area: 'Form::Base',
  2445. description: __('Defines the group of tickets created via web form.'),
  2446. options: {
  2447. form: [
  2448. {
  2449. display: '',
  2450. null: true,
  2451. name: 'form_ticket_create_group_id',
  2452. tag: 'select',
  2453. relation: 'Group',
  2454. },
  2455. ],
  2456. },
  2457. state: group_id,
  2458. preferences: {
  2459. permission: ['admin.channel_formular'],
  2460. },
  2461. frontend: false,
  2462. )
  2463. Setting.create_if_not_exists(
  2464. title: __('Limit tickets by IP per hour'),
  2465. name: 'form_ticket_create_by_ip_per_hour',
  2466. area: 'Form::Base',
  2467. description: __('Defines a limit for how many tickets can be created via web form from one IP address per hour.'),
  2468. options: {
  2469. form: [
  2470. {
  2471. display: '',
  2472. null: true,
  2473. name: 'form_ticket_create_by_ip_per_hour',
  2474. tag: 'input',
  2475. },
  2476. ],
  2477. },
  2478. state: 20,
  2479. preferences: {
  2480. permission: ['admin.channel_formular'],
  2481. },
  2482. frontend: false,
  2483. )
  2484. Setting.create_if_not_exists(
  2485. title: __('Limit tickets by IP per day'),
  2486. name: 'form_ticket_create_by_ip_per_day',
  2487. area: 'Form::Base',
  2488. description: __('Defines a limit for how many tickets can be created via web form from one IP address per day.'),
  2489. options: {
  2490. form: [
  2491. {
  2492. display: '',
  2493. null: true,
  2494. name: 'form_ticket_create_by_ip_per_day',
  2495. tag: 'input',
  2496. },
  2497. ],
  2498. },
  2499. state: 240,
  2500. preferences: {
  2501. permission: ['admin.channel_formular'],
  2502. },
  2503. frontend: false,
  2504. )
  2505. Setting.create_if_not_exists(
  2506. title: __('Limit tickets per day'),
  2507. name: 'form_ticket_create_per_day',
  2508. area: 'Form::Base',
  2509. description: __('Defines a limit for how many tickets can be created via web form per day.'),
  2510. options: {
  2511. form: [
  2512. {
  2513. display: '',
  2514. null: true,
  2515. name: 'form_ticket_create_per_day',
  2516. tag: 'input',
  2517. },
  2518. ],
  2519. },
  2520. state: 5000,
  2521. preferences: {
  2522. permission: ['admin.channel_formular'],
  2523. },
  2524. frontend: false,
  2525. )
  2526. Setting.create_if_not_exists(
  2527. title: __('Ticket Subject Size'),
  2528. name: 'ticket_subject_size',
  2529. area: 'Email::Base',
  2530. description: __('Max. length of the subject in an email reply.'),
  2531. options: {
  2532. form: [
  2533. {
  2534. display: '',
  2535. null: false,
  2536. name: 'ticket_subject_size',
  2537. tag: 'input',
  2538. },
  2539. ],
  2540. },
  2541. state: '110',
  2542. preferences: {
  2543. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2544. },
  2545. frontend: false
  2546. )
  2547. Setting.create_if_not_exists(
  2548. title: __('Ticket Subject Reply'),
  2549. name: 'ticket_subject_re',
  2550. area: 'Email::Base',
  2551. description: __('The text at the beginning of the subject in an email reply, e.g. RE, AW, or AS.'),
  2552. options: {
  2553. form: [
  2554. {
  2555. display: '',
  2556. null: true,
  2557. name: 'ticket_subject_re',
  2558. tag: 'input',
  2559. },
  2560. ],
  2561. },
  2562. state: 'RE',
  2563. preferences: {
  2564. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2565. },
  2566. frontend: false
  2567. )
  2568. Setting.create_if_not_exists(
  2569. title: __('Ticket Subject Forward'),
  2570. name: 'ticket_subject_fwd',
  2571. area: 'Email::Base',
  2572. description: __('The text at the beginning of the subject in an email forward, e. g. FWD.'),
  2573. options: {
  2574. form: [
  2575. {
  2576. display: '',
  2577. null: true,
  2578. name: 'ticket_subject_fwd',
  2579. tag: 'input',
  2580. },
  2581. ],
  2582. },
  2583. state: 'FWD',
  2584. preferences: {
  2585. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2586. },
  2587. frontend: false
  2588. )
  2589. Setting.create_if_not_exists(
  2590. title: __('Sender Format'),
  2591. name: 'ticket_define_email_from',
  2592. area: 'Email::Base',
  2593. description: __('Defines how the From field of emails (sent from answers and email tickets) should look like.'),
  2594. options: {
  2595. form: [
  2596. {
  2597. display: '',
  2598. null: true,
  2599. name: 'ticket_define_email_from',
  2600. tag: 'select',
  2601. options: {
  2602. SystemAddressName: __('System Address Display Name'),
  2603. AgentNameSystemAddressName: __('Agent Name + FromSeparator + System Address Display Name'),
  2604. AgentName: __('Agent Name'),
  2605. },
  2606. translate: true,
  2607. },
  2608. ],
  2609. },
  2610. state: 'AgentNameSystemAddressName',
  2611. preferences: {
  2612. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2613. },
  2614. frontend: false
  2615. )
  2616. Setting.create_if_not_exists(
  2617. title: __('Sender Format Separator'),
  2618. name: 'ticket_define_email_from_separator',
  2619. area: 'Email::Base',
  2620. description: __('Defines the separator between the agent\'s real name and the given group email address.'),
  2621. options: {
  2622. form: [
  2623. {
  2624. display: '',
  2625. null: false,
  2626. name: 'ticket_define_email_from_separator',
  2627. tag: 'input',
  2628. },
  2629. ],
  2630. },
  2631. state: 'via',
  2632. preferences: {
  2633. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2634. },
  2635. frontend: false
  2636. )
  2637. Setting.create_if_not_exists(
  2638. title: __('Maximum Email Size'),
  2639. name: 'postmaster_max_size',
  2640. area: 'Email::Base',
  2641. description: __('Defines the maximum accepted email size in MB.'),
  2642. options: {
  2643. form: [
  2644. {
  2645. display: '',
  2646. null: true,
  2647. name: 'postmaster_max_size',
  2648. tag: 'select',
  2649. options: {
  2650. 1 => ' 1',
  2651. 2 => ' 2',
  2652. 3 => ' 3',
  2653. 4 => ' 4',
  2654. 5 => ' 5',
  2655. 6 => ' 6',
  2656. 7 => ' 7',
  2657. 8 => ' 8',
  2658. 9 => ' 9',
  2659. 10 => ' 10',
  2660. 15 => ' 15',
  2661. 20 => ' 20',
  2662. 25 => ' 25',
  2663. 30 => ' 30',
  2664. 35 => ' 35',
  2665. 40 => ' 40',
  2666. 45 => ' 45',
  2667. 50 => ' 50',
  2668. 60 => ' 60',
  2669. 70 => ' 70',
  2670. 80 => ' 80',
  2671. 90 => ' 90',
  2672. 100 => '100',
  2673. 125 => '125',
  2674. 150 => '150',
  2675. },
  2676. },
  2677. ],
  2678. },
  2679. state: 10,
  2680. preferences: {
  2681. online_service_disable: true,
  2682. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2683. },
  2684. frontend: false
  2685. )
  2686. Setting.create_if_not_exists(
  2687. title: __('Additional follow-up detection'),
  2688. name: 'postmaster_follow_up_search_in',
  2689. area: 'Email::Base',
  2690. 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.'),
  2691. options: {
  2692. form: [
  2693. {
  2694. display: '',
  2695. null: true,
  2696. name: 'postmaster_follow_up_search_in',
  2697. tag: 'checkbox',
  2698. options: {
  2699. 'references' => __('References - Search for follow-up also in In-Reply-To or References headers.'),
  2700. 'body' => __('Body - Search for follow-up also in mail body.'),
  2701. 'attachment' => __('Attachment - Search for follow-up also in attachments.'),
  2702. },
  2703. translate: true,
  2704. },
  2705. ],
  2706. },
  2707. state: [],
  2708. preferences: {
  2709. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2710. },
  2711. frontend: false
  2712. )
  2713. Setting.create_if_not_exists(
  2714. title: __('Sender based on Reply-To header'),
  2715. name: 'postmaster_sender_based_on_reply_to',
  2716. area: 'Email::Base',
  2717. 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.'),
  2718. options: {
  2719. form: [
  2720. {
  2721. display: '',
  2722. null: true,
  2723. name: 'postmaster_sender_based_on_reply_to',
  2724. tag: 'select',
  2725. options: {
  2726. '' => '-',
  2727. 'as_sender_of_email' => __('Take Reply-To header as sender/from of email.'),
  2728. 'as_sender_of_email_use_from_realname' => __('Take Reply-To header as sender/from of email and use the real name of origin from.'),
  2729. },
  2730. translate: true,
  2731. },
  2732. ],
  2733. },
  2734. state: [],
  2735. preferences: {
  2736. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2737. },
  2738. frontend: false
  2739. )
  2740. Setting.create_if_not_exists(
  2741. title: __('Customer selection based on sender and receiver list'),
  2742. name: 'postmaster_sender_is_agent_search_for_customer',
  2743. area: 'Email::Base',
  2744. description: __('If the sender is an agent, set the first user in the recipient list as the customer.'),
  2745. options: {
  2746. form: [
  2747. {
  2748. display: '',
  2749. null: true,
  2750. name: 'postmaster_sender_is_agent_search_for_customer',
  2751. tag: 'boolean',
  2752. options: {
  2753. true => 'yes',
  2754. false => 'no',
  2755. },
  2756. },
  2757. ],
  2758. },
  2759. state: true,
  2760. preferences: {
  2761. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2762. },
  2763. frontend: false
  2764. )
  2765. Setting.create_if_not_exists(
  2766. title: __('Send postmaster mail if mail too large'),
  2767. name: 'postmaster_send_reject_if_mail_too_large',
  2768. area: 'Email::Base',
  2769. description: __('Send postmaster reject mail to sender of mail if mail is too large.'),
  2770. options: {
  2771. form: [
  2772. {
  2773. display: '',
  2774. null: true,
  2775. name: 'postmaster_send_reject_if_mail_too_large',
  2776. tag: 'boolean',
  2777. options: {
  2778. true => 'yes',
  2779. false => 'no',
  2780. },
  2781. },
  2782. ],
  2783. },
  2784. state: true,
  2785. preferences: {
  2786. online_service_disable: true,
  2787. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2788. },
  2789. frontend: false
  2790. )
  2791. Setting.create_if_not_exists(
  2792. title: __('Notification Sender'),
  2793. name: 'notification_sender',
  2794. area: 'Email::Base',
  2795. description: __('Defines the sender of email notifications.'),
  2796. options: {
  2797. form: [
  2798. {
  2799. display: '',
  2800. null: false,
  2801. name: 'notification_sender',
  2802. tag: 'input',
  2803. },
  2804. ],
  2805. },
  2806. state: '#{config.product_name} <noreply@#{config.fqdn}>', # rubocop:disable Lint/InterpolationCheck
  2807. preferences: {
  2808. online_service_disable: true,
  2809. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2810. },
  2811. frontend: false
  2812. )
  2813. Setting.create_if_not_exists(
  2814. title: __('Block Notifications'),
  2815. name: 'send_no_auto_response_reg_exp',
  2816. area: 'Email::Base',
  2817. description: __('If this regex matches, no notification will be sent by the sender.'),
  2818. options: {
  2819. form: [
  2820. {
  2821. display: '',
  2822. null: false,
  2823. name: 'send_no_auto_response_reg_exp',
  2824. tag: 'input',
  2825. },
  2826. ],
  2827. },
  2828. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?',
  2829. preferences: {
  2830. online_service_disable: true,
  2831. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2832. },
  2833. frontend: false
  2834. )
  2835. Setting.create_if_not_exists(
  2836. title: __('BCC address for all outgoing emails'),
  2837. name: 'system_bcc',
  2838. area: 'Email::Enhanced',
  2839. description: __('To archive all outgoing emails from Zammad to external, you can store a BCC email address here.'),
  2840. options: {},
  2841. state: '',
  2842. preferences: { online_service_disable: true },
  2843. frontend: false
  2844. )
  2845. Setting.create_if_not_exists(
  2846. title: __('API Token Access'),
  2847. name: 'api_token_access',
  2848. area: 'API::Base',
  2849. description: __('Enable REST API using tokens (not username/email address and password). Each user needs to create its own access tokens in user profile.'),
  2850. options: {
  2851. form: [
  2852. {
  2853. display: '',
  2854. null: true,
  2855. name: 'api_token_access',
  2856. tag: 'boolean',
  2857. options: {
  2858. true => 'yes',
  2859. false => 'no',
  2860. },
  2861. },
  2862. ],
  2863. },
  2864. state: true,
  2865. preferences: {
  2866. permission: ['admin.api'],
  2867. },
  2868. frontend: true
  2869. )
  2870. Setting.create_if_not_exists(
  2871. title: __('API Password Access'),
  2872. name: 'api_password_access',
  2873. area: 'API::Base',
  2874. description: __('Enable REST API access using the username/email address and password for the authentication user.'),
  2875. options: {
  2876. form: [
  2877. {
  2878. display: '',
  2879. null: true,
  2880. name: 'api_password_access',
  2881. tag: 'boolean',
  2882. options: {
  2883. true => 'yes',
  2884. false => 'no',
  2885. },
  2886. },
  2887. ],
  2888. },
  2889. state: true,
  2890. preferences: {
  2891. permission: ['admin.api'],
  2892. },
  2893. frontend: false
  2894. )
  2895. Setting.create_if_not_exists(
  2896. title: __('Monitoring Token'),
  2897. name: 'monitoring_token',
  2898. area: 'HealthCheck::Base',
  2899. description: __('Token for monitoring.'),
  2900. options: {
  2901. form: [
  2902. {
  2903. display: '',
  2904. null: false,
  2905. name: 'monitoring_token',
  2906. tag: 'input',
  2907. },
  2908. ],
  2909. },
  2910. state: ENV['MONITORING_TOKEN'] || SecureRandom.urlsafe_base64(40),
  2911. preferences: {
  2912. permission: ['admin.monitoring'],
  2913. },
  2914. frontend: false
  2915. )
  2916. Setting.create_if_not_exists(
  2917. title: __('Enable Chat'),
  2918. name: 'chat',
  2919. area: 'Chat::Base',
  2920. description: __('Enable/disable online chat.'),
  2921. options: {
  2922. form: [
  2923. {
  2924. display: '',
  2925. null: true,
  2926. name: 'chat',
  2927. tag: 'boolean',
  2928. options: {
  2929. true => 'yes',
  2930. false => 'no',
  2931. },
  2932. },
  2933. ],
  2934. },
  2935. preferences: {
  2936. trigger: ['menu:render', 'chat:rerender'],
  2937. permission: ['admin.channel_chat'],
  2938. },
  2939. state: false,
  2940. frontend: true
  2941. )
  2942. Setting.create_if_not_exists(
  2943. title: __('Agent idle timeout'),
  2944. name: 'chat_agent_idle_timeout',
  2945. area: 'Chat::Extended',
  2946. description: __('Idle timeout in seconds until agent is set offline automatically.'),
  2947. options: {
  2948. form: [
  2949. {
  2950. display: '',
  2951. null: false,
  2952. name: 'chat_agent_idle_timeout',
  2953. tag: 'input',
  2954. },
  2955. ],
  2956. },
  2957. state: '120',
  2958. preferences: {
  2959. permission: ['admin.channel_chat'],
  2960. },
  2961. frontend: true
  2962. )
  2963. Setting.create_if_not_exists(
  2964. title: __('Defines searchable models.'),
  2965. name: 'models_searchable',
  2966. area: 'Models::Base',
  2967. description: __('Defines the searchable models.'),
  2968. options: {},
  2969. state: Models.searchable.map(&:to_s),
  2970. preferences: {
  2971. authentication: true,
  2972. },
  2973. frontend: true,
  2974. )
  2975. Setting.create_if_not_exists(
  2976. title: __('Default Screen'),
  2977. name: 'default_controller',
  2978. area: 'Core',
  2979. description: __('Defines the default screen.'),
  2980. options: {},
  2981. state: '#dashboard',
  2982. frontend: true
  2983. )
  2984. Setting.create_if_not_exists(
  2985. title: __('Elasticsearch Endpoint URL'),
  2986. name: 'es_url',
  2987. area: 'SearchIndex::Elasticsearch',
  2988. description: __('Defines endpoint of Elasticsearch.'),
  2989. state: '',
  2990. preferences: { online_service_disable: true },
  2991. frontend: false
  2992. )
  2993. Setting.create_if_not_exists(
  2994. title: __('Elasticsearch Endpoint User'),
  2995. name: 'es_user',
  2996. area: 'SearchIndex::Elasticsearch',
  2997. description: __('Defines HTTP basic auth user of Elasticsearch.'),
  2998. state: '',
  2999. preferences: { online_service_disable: true },
  3000. frontend: false
  3001. )
  3002. Setting.create_if_not_exists(
  3003. title: __('Elasticsearch Endpoint Password'),
  3004. name: 'es_password',
  3005. area: 'SearchIndex::Elasticsearch',
  3006. description: __('Defines HTTP basic auth password of Elasticsearch.'),
  3007. state: '',
  3008. preferences: { online_service_disable: true },
  3009. frontend: false
  3010. )
  3011. Setting.create_if_not_exists(
  3012. title: __('Elasticsearch Endpoint Index'),
  3013. name: 'es_index',
  3014. area: 'SearchIndex::Elasticsearch',
  3015. description: __('Defines Elasticsearch index name.'),
  3016. state: 'zammad',
  3017. preferences: { online_service_disable: true },
  3018. frontend: false
  3019. )
  3020. Setting.create_if_not_exists(
  3021. title: __('Elasticsearch Attachment Extensions'),
  3022. name: 'es_attachment_ignore',
  3023. area: 'SearchIndex::Elasticsearch',
  3024. description: __('Defines attachment extensions which will be ignored by Elasticsearch.'),
  3025. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  3026. preferences: { online_service_disable: true },
  3027. frontend: false
  3028. )
  3029. Setting.create_if_not_exists(
  3030. title: __('Elasticsearch Attachment Size'),
  3031. name: 'es_attachment_max_size_in_mb',
  3032. area: 'SearchIndex::Elasticsearch',
  3033. description: __('Define max. attachment size for Elasticsearch.'),
  3034. state: 10,
  3035. preferences: { online_service_disable: true },
  3036. frontend: false
  3037. )
  3038. Setting.create_if_not_exists(
  3039. title: __('Elasticsearch Total Payload Size'),
  3040. name: 'es_total_max_size_in_mb',
  3041. area: 'SearchIndex::Elasticsearch',
  3042. description: __('Define max. payload size for Elasticsearch.'),
  3043. state: 300,
  3044. preferences: { online_service_disable: true },
  3045. frontend: false
  3046. )
  3047. Setting.create_if_not_exists(
  3048. title: __('Elasticsearch Pipeline Name'),
  3049. name: 'es_pipeline',
  3050. area: 'SearchIndex::Elasticsearch',
  3051. description: __('Define pipeline name for Elasticsearch.'),
  3052. state: '',
  3053. preferences: { online_service_disable: true },
  3054. frontend: false
  3055. )
  3056. Setting.create_if_not_exists(
  3057. title: __('Import Mode'),
  3058. name: 'import_mode',
  3059. area: 'Import::Base',
  3060. description: __('Puts Zammad into import mode (disables some triggers).'),
  3061. options: {
  3062. form: [
  3063. {
  3064. display: '',
  3065. null: true,
  3066. name: 'import_mode',
  3067. tag: 'boolean',
  3068. options: {
  3069. true => 'yes',
  3070. false => 'no',
  3071. },
  3072. },
  3073. ],
  3074. },
  3075. state: false,
  3076. frontend: true
  3077. )
  3078. Setting.create_if_not_exists(
  3079. title: __('Import Backend'),
  3080. name: 'import_backend',
  3081. area: 'Import::Base::Internal',
  3082. description: __('Set backend which is being used for import.'),
  3083. options: {},
  3084. state: '',
  3085. frontend: true
  3086. )
  3087. Setting.create_if_not_exists(
  3088. title: __('Ignore Escalation/SLA Information'),
  3089. name: 'import_ignore_sla',
  3090. area: 'Import::Base',
  3091. description: __('Ignore escalation/SLA information for import.'),
  3092. options: {
  3093. form: [
  3094. {
  3095. display: '',
  3096. null: true,
  3097. name: 'import_ignore_sla',
  3098. tag: 'boolean',
  3099. options: {
  3100. true => 'yes',
  3101. false => 'no',
  3102. },
  3103. },
  3104. ],
  3105. },
  3106. state: false,
  3107. frontend: false
  3108. )
  3109. Setting.create_if_not_exists(
  3110. title: __('Import Endpoint'),
  3111. name: 'import_otrs_endpoint',
  3112. area: 'Import::OTRS',
  3113. description: __('Defines an OTRS endpoint to import users, tickets, states, and articles.'),
  3114. options: {
  3115. form: [
  3116. {
  3117. display: '',
  3118. null: false,
  3119. name: 'import_otrs_endpoint',
  3120. tag: 'input',
  3121. },
  3122. ],
  3123. },
  3124. state: 'http://otrs_host/otrs',
  3125. frontend: false
  3126. )
  3127. Setting.create_if_not_exists(
  3128. title: __('Import Key'),
  3129. name: 'import_otrs_endpoint_key',
  3130. area: 'Import::OTRS',
  3131. description: __('Defines OTRS endpoint authentication key.'),
  3132. options: {
  3133. form: [
  3134. {
  3135. display: '',
  3136. null: false,
  3137. name: 'import_otrs_endpoint_key',
  3138. tag: 'input',
  3139. },
  3140. ],
  3141. },
  3142. state: '',
  3143. frontend: false
  3144. )
  3145. Setting.create_if_not_exists(
  3146. title: __('Import User for HTTP basic authentication'),
  3147. name: 'import_otrs_user',
  3148. area: 'Import::OTRS',
  3149. description: __('Defines HTTP basic authentication user (only if OTRS is protected via HTTP basic auth).'),
  3150. options: {
  3151. form: [
  3152. {
  3153. display: '',
  3154. null: true,
  3155. name: 'import_otrs_user',
  3156. tag: 'input',
  3157. },
  3158. ],
  3159. },
  3160. state: '',
  3161. frontend: false
  3162. )
  3163. Setting.create_if_not_exists(
  3164. title: __('Import Password for HTTP basic authentication'),
  3165. name: 'import_otrs_password',
  3166. area: 'Import::OTRS',
  3167. description: __('Defines HTTP basic authentication password (only if OTRS is protected via HTTP basic auth).'),
  3168. options: {
  3169. form: [
  3170. {
  3171. display: '',
  3172. null: true,
  3173. name: 'import_otrs_password',
  3174. tag: 'input',
  3175. },
  3176. ],
  3177. },
  3178. state: '',
  3179. frontend: false
  3180. )
  3181. Setting.create_if_not_exists(
  3182. title: __('Import Endpoint'),
  3183. name: 'import_zendesk_endpoint',
  3184. area: 'Import::Zendesk',
  3185. description: __('Defines a Zendesk endpoint to import users, tickets, states, and articles.'),
  3186. options: {
  3187. form: [
  3188. {
  3189. display: '',
  3190. null: false,
  3191. name: 'import_zendesk_endpoint',
  3192. tag: 'input',
  3193. },
  3194. ],
  3195. },
  3196. state: 'https://yours.zendesk.com/api/v2',
  3197. frontend: false
  3198. )
  3199. Setting.create_if_not_exists(
  3200. title: __('Import API key for requesting the Zendesk API'),
  3201. name: 'import_zendesk_endpoint_key',
  3202. area: 'Import::Zendesk',
  3203. description: __('Defines Zendesk endpoint authentication API key.'),
  3204. options: {
  3205. form: [
  3206. {
  3207. display: '',
  3208. null: false,
  3209. name: 'import_zendesk_endpoint_key',
  3210. tag: 'input',
  3211. },
  3212. ],
  3213. },
  3214. state: '',
  3215. frontend: false
  3216. )
  3217. Setting.create_if_not_exists(
  3218. title: __('Import User for requesting the Zendesk API'),
  3219. name: 'import_zendesk_endpoint_username',
  3220. area: 'Import::Zendesk',
  3221. description: __('Defines Zendesk endpoint authentication user.'),
  3222. options: {
  3223. form: [
  3224. {
  3225. display: '',
  3226. null: true,
  3227. name: 'import_zendesk_endpoint_username',
  3228. tag: 'input',
  3229. },
  3230. ],
  3231. },
  3232. state: '',
  3233. frontend: false
  3234. )
  3235. Setting.create_if_not_exists(
  3236. title: __('Import Endpoint'),
  3237. name: 'import_freshdesk_endpoint',
  3238. area: 'Import::Freshdesk',
  3239. description: __('Defines a Freshdesk endpoint to import users, tickets, states, and articles.'),
  3240. options: {
  3241. form: [
  3242. {
  3243. display: '',
  3244. null: false,
  3245. name: 'import_freshdesk_endpoint',
  3246. tag: 'input',
  3247. },
  3248. ],
  3249. },
  3250. state: 'https://yours.freshdesk.com/api/v2',
  3251. frontend: false
  3252. )
  3253. Setting.create_if_not_exists(
  3254. title: __('Import API key for requesting the Freshdesk API'),
  3255. name: 'import_freshdesk_endpoint_key',
  3256. area: 'Import::Freshdesk',
  3257. description: __('Defines Freshdesk endpoint authentication API key.'),
  3258. options: {
  3259. form: [
  3260. {
  3261. display: '',
  3262. null: false,
  3263. name: 'import_freshdesk_endpoint_key',
  3264. tag: 'input',
  3265. },
  3266. ],
  3267. },
  3268. state: '',
  3269. frontend: false
  3270. )
  3271. Setting.create_if_not_exists(
  3272. title: __('Import Endpoint'),
  3273. name: 'import_kayako_endpoint',
  3274. area: 'Import::Kayako',
  3275. description: __('Defines a Kayako endpoint to import users, tickets, states, and articles.'),
  3276. options: {
  3277. form: [
  3278. {
  3279. display: '',
  3280. null: false,
  3281. name: 'import_kayako_endpoint',
  3282. tag: 'input',
  3283. },
  3284. ],
  3285. },
  3286. state: 'https://yours.kayako.com/api/v1',
  3287. frontend: false
  3288. )
  3289. Setting.create_if_not_exists(
  3290. title: __('Import User for requesting the Kayako API'),
  3291. name: 'import_kayako_endpoint_username',
  3292. area: 'Import::Kayako',
  3293. description: __('Defines Kayako endpoint authentication user.'),
  3294. options: {
  3295. form: [
  3296. {
  3297. display: '',
  3298. null: false,
  3299. name: 'import_kayako_endpoint_username',
  3300. tag: 'input',
  3301. },
  3302. ],
  3303. },
  3304. state: '',
  3305. frontend: false
  3306. )
  3307. Setting.create_if_not_exists(
  3308. title: __('Import Password for requesting the Kayako API'),
  3309. name: 'import_kayako_endpoint_password',
  3310. area: 'Import::Kayako',
  3311. description: __('Defines Kayako endpoint authentication password.'),
  3312. options: {
  3313. form: [
  3314. {
  3315. display: '',
  3316. null: false,
  3317. name: 'import_kayako_endpoint_password',
  3318. tag: 'input',
  3319. },
  3320. ],
  3321. },
  3322. state: '',
  3323. frontend: false
  3324. )
  3325. Setting.create_if_not_exists(
  3326. title: __('Import Backends'),
  3327. name: 'import_backends',
  3328. area: 'Import',
  3329. description: __('A list of active import backends that gets scheduled automatically.'),
  3330. options: {},
  3331. state: ['Import::Ldap', 'Import::Exchange'],
  3332. preferences: {
  3333. permission: ['admin'],
  3334. },
  3335. frontend: false
  3336. )
  3337. Setting.create_if_not_exists(
  3338. title: __('Sequencer log level'),
  3339. name: 'sequencer_log_level',
  3340. area: 'Core',
  3341. description: __('Defines the log levels for various logging actions of the Sequencer.'),
  3342. options: {},
  3343. state: {
  3344. sequence: {
  3345. start_finish: :debug,
  3346. unit: :debug,
  3347. result: :debug,
  3348. },
  3349. state: {
  3350. optional: :debug,
  3351. set: :debug,
  3352. get: :debug,
  3353. attribute_initialization: {
  3354. start_finish: :debug,
  3355. attributes: :debug,
  3356. },
  3357. parameter_initialization: {
  3358. parameters: :debug,
  3359. start_finish: :debug,
  3360. unused: :debug,
  3361. },
  3362. expectations_initialization: :debug,
  3363. cleanup: {
  3364. start_finish: :debug,
  3365. remove: :debug,
  3366. }
  3367. }
  3368. },
  3369. frontend: false,
  3370. )
  3371. Setting.create_if_not_exists(
  3372. title: __('Time Accounting'),
  3373. name: 'time_accounting',
  3374. area: 'Web::Base',
  3375. description: __('Enable time accounting.'),
  3376. options: {
  3377. form: [
  3378. {
  3379. display: '',
  3380. null: true,
  3381. name: 'time_accounting',
  3382. tag: 'boolean',
  3383. options: {
  3384. true => 'yes',
  3385. false => 'no',
  3386. },
  3387. },
  3388. ],
  3389. },
  3390. preferences: {
  3391. authentication: true,
  3392. permission: ['admin.time_accounting'],
  3393. },
  3394. state: false,
  3395. frontend: true
  3396. )
  3397. Setting.create_if_not_exists(
  3398. title: __('Time Accounting Selector'),
  3399. name: 'time_accounting_selector',
  3400. area: 'Web::Base',
  3401. description: __('Enable time accounting for these tickets.'),
  3402. options: {
  3403. form: [
  3404. {},
  3405. ],
  3406. },
  3407. preferences: {
  3408. authentication: true,
  3409. permission: ['admin.time_accounting'],
  3410. },
  3411. state: {},
  3412. frontend: true
  3413. )
  3414. Setting.create_if_not_exists(
  3415. title: __('New Tags'),
  3416. name: 'tag_new',
  3417. area: 'Web::Base',
  3418. description: __('Allow users to create new tags.'),
  3419. options: {
  3420. form: [
  3421. {
  3422. display: '',
  3423. null: true,
  3424. name: 'tag_new',
  3425. tag: 'boolean',
  3426. options: {
  3427. true => 'yes',
  3428. false => 'no',
  3429. },
  3430. },
  3431. ],
  3432. },
  3433. preferences: {
  3434. authentication: true,
  3435. permission: ['admin.tag'],
  3436. },
  3437. state: true,
  3438. frontend: true
  3439. )
  3440. Setting.create_if_not_exists(
  3441. title: __('Default calendar tickets subscriptions'),
  3442. name: 'defaults_calendar_subscriptions_tickets',
  3443. area: 'Defaults::CalendarSubscriptions',
  3444. description: __('Defines the default calendar tickets subscription settings.'),
  3445. options: {},
  3446. state: {
  3447. escalation: {
  3448. own: true,
  3449. not_assigned: false,
  3450. },
  3451. new_open: {
  3452. own: true,
  3453. not_assigned: false,
  3454. },
  3455. pending: {
  3456. own: true,
  3457. not_assigned: false,
  3458. }
  3459. },
  3460. preferences: {
  3461. authentication: true,
  3462. },
  3463. frontend: true
  3464. )
  3465. Setting.create_if_not_exists(
  3466. title: __('Defines postmaster filter.'),
  3467. name: '0005_postmaster_filter_trusted',
  3468. area: 'Postmaster::PreFilter',
  3469. description: __('Defines postmaster filter to remove X-Zammad headers from untrustworthy sources.'),
  3470. options: {},
  3471. state: 'Channel::Filter::Trusted',
  3472. frontend: false
  3473. )
  3474. Setting.create_if_not_exists(
  3475. title: __('Defines postmaster filter.'),
  3476. name: '0006_postmaster_filter_auto_response_check',
  3477. area: 'Postmaster::PreFilter',
  3478. description: __('Defines postmaster filter to identify auto responses to prevent auto replies from Zammad.'),
  3479. options: {},
  3480. state: 'Channel::Filter::AutoResponseCheck',
  3481. frontend: false
  3482. )
  3483. Setting.create_if_not_exists(
  3484. title: __('Defines postmaster filter.'),
  3485. name: '0007_postmaster_filter_follow_up_check',
  3486. area: 'Postmaster::PreFilter',
  3487. description: __('Defines postmaster filter to identify follow-ups (based on admin settings).'),
  3488. options: {},
  3489. state: 'Channel::Filter::FollowUpCheck',
  3490. frontend: false
  3491. )
  3492. Setting.create_if_not_exists(
  3493. title: __('Defines postmaster filter.'),
  3494. name: '0008_postmaster_filter_follow_up_merged',
  3495. area: 'Postmaster::PreFilter',
  3496. description: __('Defines postmaster filter to identify follow-up ticket for merged tickets.'),
  3497. options: {},
  3498. state: 'Channel::Filter::FollowUpMerged',
  3499. frontend: false
  3500. )
  3501. Setting.create_if_not_exists(
  3502. title: __('Defines postmaster filter.'),
  3503. name: '0009_postmaster_filter_follow_up_assignment',
  3504. area: 'Postmaster::PreFilter',
  3505. description: __('Defines postmaster filter to set the owner (based on group follow up assignment).'),
  3506. options: {},
  3507. state: 'Channel::Filter::FollowUpAssignment',
  3508. frontend: false
  3509. )
  3510. Setting.create_if_not_exists(
  3511. title: __('Defines postmaster filter.'),
  3512. name: '0011_postmaster_sender_based_on_reply_to',
  3513. area: 'Postmaster::PreFilter',
  3514. description: __('Defines postmaster filter to set the sender/from of emails based on reply-to header.'),
  3515. options: {},
  3516. state: 'Channel::Filter::ReplyToBasedSender',
  3517. frontend: false
  3518. )
  3519. Setting.create_if_not_exists(
  3520. title: __('Define postmaster filter.'),
  3521. name: '0018_postmaster_import_archive',
  3522. area: 'Postmaster::PreFilter',
  3523. description: __('Define postmaster filter to import archive mailboxes.'),
  3524. options: {},
  3525. state: 'Channel::Filter::ImportArchive',
  3526. frontend: false
  3527. )
  3528. Setting.create_if_not_exists(
  3529. title: __('Defines postmaster filter.'),
  3530. name: '0012_postmaster_filter_sender_is_system_address',
  3531. area: 'Postmaster::PreFilter',
  3532. description: __('Defines postmaster filter to check if email has been created by Zammad itself and will set the article sender.'),
  3533. options: {},
  3534. state: 'Channel::Filter::SenderIsSystemAddress',
  3535. frontend: false
  3536. )
  3537. Setting.create_if_not_exists(
  3538. title: __('Defines postmaster filter.'),
  3539. name: '0014_postmaster_filter_own_notification_loop_detection',
  3540. area: 'Postmaster::PreFilter',
  3541. description: __('Defines postmaster filter to check if the email is a self-created notification email, then ignore it to prevent email loops.'),
  3542. options: {},
  3543. state: 'Channel::Filter::OwnNotificationLoopDetection',
  3544. frontend: false
  3545. )
  3546. Setting.create_if_not_exists(
  3547. title: __('Defines postmaster filter.'),
  3548. name: '0015_postmaster_filter_identify_sender',
  3549. area: 'Postmaster::PreFilter',
  3550. description: __('Defines postmaster filter to identify sender user.'),
  3551. options: {},
  3552. state: 'Channel::Filter::IdentifySender',
  3553. frontend: false
  3554. )
  3555. Setting.create_if_not_exists(
  3556. title: __('Defines postmaster filter.'),
  3557. name: '0016_postmaster_filter_smime',
  3558. area: 'Postmaster::PreFilter',
  3559. description: __('Defines postmaster filter to handle secure mailing.'),
  3560. options: {},
  3561. state: 'Channel::Filter::SecureMailing',
  3562. frontend: false
  3563. )
  3564. Setting.create_if_not_exists(
  3565. title: __('Defines postmaster filter.'),
  3566. name: '0030_postmaster_filter_out_of_office_check',
  3567. area: 'Postmaster::PreFilter',
  3568. description: __('Defines postmaster filter to identify out-of-office emails for follow-up detection and keeping current ticket state.'),
  3569. options: {},
  3570. state: 'Channel::Filter::OutOfOfficeCheck',
  3571. frontend: false
  3572. )
  3573. Setting.create_if_not_exists(
  3574. title: __('Defines postmaster filter.'),
  3575. name: '0200_postmaster_filter_follow_up_possible_check',
  3576. area: 'Postmaster::PreFilter',
  3577. description: __('Define postmaster filter to check if follow-ups get created (based on admin settings).'),
  3578. options: {},
  3579. state: 'Channel::Filter::FollowUpPossibleCheck',
  3580. frontend: false
  3581. )
  3582. Setting.create_if_not_exists(
  3583. title: __('Defines postmaster filter.'),
  3584. name: '0900_postmaster_filter_bounce_follow_up_check',
  3585. area: 'Postmaster::PreFilter',
  3586. description: __('Defines postmaster filter to identify postmaster bounces; and handles them as follow-up of the original tickets'),
  3587. options: {},
  3588. state: 'Channel::Filter::BounceFollowUpCheck',
  3589. frontend: false
  3590. )
  3591. Setting.create_if_not_exists(
  3592. title: __('Defines postmaster filter.'),
  3593. name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
  3594. area: 'Postmaster::PreFilter',
  3595. description: __('Defines postmaster filter to identify postmaster bounces; and disables sending notification if delivery fails permanently.'),
  3596. options: {},
  3597. state: 'Channel::Filter::BounceDeliveryPermanentFailed',
  3598. frontend: false
  3599. )
  3600. Setting.create_if_not_exists(
  3601. title: __('Defines postmaster filter.'),
  3602. name: '0955_postmaster_filter_bounce_delivery_temporary_failed',
  3603. area: 'Postmaster::PreFilter',
  3604. description: __('Defines postmaster filter to identify postmaster bounces; and reopens tickets if delivery fails permanently.'),
  3605. options: {},
  3606. state: 'Channel::Filter::BounceDeliveryTemporaryFailed',
  3607. frontend: false
  3608. )
  3609. Setting.create_if_not_exists(
  3610. title: __('Defines postmaster filter.'),
  3611. name: '1000_postmaster_filter_database_check',
  3612. area: 'Postmaster::PreFilter',
  3613. description: __('Defines postmaster filter for filters managed via admin interface.'),
  3614. options: {},
  3615. state: 'Channel::Filter::Database',
  3616. frontend: false
  3617. )
  3618. Setting.create_if_not_exists(
  3619. title: __('Defines postmaster filter.'),
  3620. name: '5000_postmaster_filter_icinga',
  3621. area: 'Postmaster::PreFilter',
  3622. description: __('Defines postmaster filter to manage Icinga (http://www.icinga.org) emails.'),
  3623. options: {},
  3624. state: 'Channel::Filter::Icinga',
  3625. frontend: false
  3626. )
  3627. Setting.create_if_not_exists(
  3628. title: __('Defines postmaster filter.'),
  3629. name: '5100_postmaster_filter_nagios',
  3630. area: 'Postmaster::PreFilter',
  3631. description: __('Defines postmaster filter to manage Nagios (http://www.nagios.org) emails.'),
  3632. options: {},
  3633. state: 'Channel::Filter::Nagios',
  3634. frontend: false
  3635. )
  3636. Setting.create_if_not_exists(
  3637. title: __('Defines postmaster filter.'),
  3638. name: '5300_postmaster_filter_monit',
  3639. area: 'Postmaster::PreFilter',
  3640. description: __('Defines postmaster filter to manage Monit (https://mmonit.com/monit/) emails.'),
  3641. options: {},
  3642. state: 'Channel::Filter::Monit',
  3643. frontend: false
  3644. )
  3645. Setting.create_if_not_exists(
  3646. title: __('Defines postmaster filter.'),
  3647. name: '5400_postmaster_filter_service_now_check',
  3648. area: 'Postmaster::PreFilter',
  3649. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  3650. options: {},
  3651. state: 'Channel::Filter::ServiceNowCheck',
  3652. frontend: false
  3653. )
  3654. Setting.create_if_not_exists(
  3655. title: __('Defines postmaster filter.'),
  3656. name: '5401_postmaster_filter_service_now_check',
  3657. area: 'Postmaster::PostFilter',
  3658. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  3659. options: {},
  3660. state: 'Channel::Filter::ServiceNowCheck',
  3661. frontend: false
  3662. )
  3663. Setting.create_if_not_exists(
  3664. title: __('Defines postmaster filter.'),
  3665. name: '5400_postmaster_filter_jira_check',
  3666. area: 'Postmaster::PreFilter',
  3667. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  3668. options: {},
  3669. state: 'Channel::Filter::JiraCheck',
  3670. frontend: false
  3671. )
  3672. Setting.create_if_not_exists(
  3673. title: __('Defines postmaster filter.'),
  3674. name: '5401_postmaster_filter_jira_check',
  3675. area: 'Postmaster::PostFilter',
  3676. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  3677. options: {},
  3678. state: 'Channel::Filter::JiraCheck',
  3679. frontend: false
  3680. )
  3681. Setting.create_if_not_exists(
  3682. title: __('Define postmaster filter.'),
  3683. name: '5500_postmaster_internal_article_check',
  3684. area: 'Postmaster::PreFilter',
  3685. 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.'),
  3686. options: {},
  3687. state: 'Channel::Filter::InternalArticleCheck',
  3688. frontend: false
  3689. )
  3690. Setting.create_if_not_exists(
  3691. title: __('Icinga integration'),
  3692. name: 'icinga_integration',
  3693. area: 'Integration::Switch',
  3694. description: __('Defines if Icinga (http://www.icinga.org) is enabled or not.'),
  3695. options: {
  3696. form: [
  3697. {
  3698. display: '',
  3699. null: true,
  3700. name: 'icinga_integration',
  3701. tag: 'boolean',
  3702. options: {
  3703. true => 'yes',
  3704. false => 'no',
  3705. },
  3706. },
  3707. ],
  3708. },
  3709. state: false,
  3710. preferences: {
  3711. prio: 1,
  3712. permission: ['admin.integration'],
  3713. },
  3714. frontend: false
  3715. )
  3716. Setting.create_if_not_exists(
  3717. title: __('Sender'),
  3718. name: 'icinga_sender',
  3719. area: 'Integration::Icinga',
  3720. description: __('Defines the sender email address of Icinga emails.'),
  3721. options: {
  3722. form: [
  3723. {
  3724. display: '',
  3725. null: false,
  3726. name: 'icinga_sender',
  3727. tag: 'input',
  3728. placeholder: 'icinga@monitoring.example.com',
  3729. },
  3730. ],
  3731. },
  3732. state: 'icinga@monitoring.example.com',
  3733. preferences: {
  3734. prio: 2,
  3735. permission: ['admin.integration'],
  3736. },
  3737. frontend: false,
  3738. )
  3739. Setting.create_if_not_exists(
  3740. title: __('Auto close'),
  3741. name: 'icinga_auto_close',
  3742. area: 'Integration::Icinga',
  3743. description: __('Defines if tickets should be closed if service is recovered.'),
  3744. options: {
  3745. form: [
  3746. {
  3747. display: '',
  3748. null: true,
  3749. name: 'icinga_auto_close',
  3750. tag: 'boolean',
  3751. options: {
  3752. true => 'yes',
  3753. false => 'no',
  3754. },
  3755. },
  3756. ],
  3757. },
  3758. state: true,
  3759. preferences: {
  3760. prio: 3,
  3761. permission: ['admin.integration'],
  3762. },
  3763. frontend: false
  3764. )
  3765. Setting.create_if_not_exists(
  3766. title: __('Auto-close state'),
  3767. name: 'icinga_auto_close_state_id',
  3768. area: 'Integration::Icinga',
  3769. description: __('Defines the state of auto-closed tickets.'),
  3770. options: {
  3771. form: [
  3772. {
  3773. display: '',
  3774. null: false,
  3775. name: 'icinga_auto_close_state_id',
  3776. tag: 'select',
  3777. relation: 'TicketState',
  3778. },
  3779. ],
  3780. },
  3781. state: 4,
  3782. preferences: {
  3783. prio: 4,
  3784. permission: ['admin.integration'],
  3785. },
  3786. frontend: false
  3787. )
  3788. Setting.create_if_not_exists(
  3789. title: __('Nagios integration'),
  3790. name: 'nagios_integration',
  3791. area: 'Integration::Switch',
  3792. description: __('Defines if Nagios (http://www.nagios.org) is enabled or not.'),
  3793. options: {
  3794. form: [
  3795. {
  3796. display: '',
  3797. null: true,
  3798. name: 'nagios_integration',
  3799. tag: 'boolean',
  3800. options: {
  3801. true => 'yes',
  3802. false => 'no',
  3803. },
  3804. },
  3805. ],
  3806. },
  3807. state: false,
  3808. preferences: {
  3809. prio: 1,
  3810. permission: ['admin.integration'],
  3811. },
  3812. frontend: false
  3813. )
  3814. Setting.create_if_not_exists(
  3815. title: __('Sender'),
  3816. name: 'nagios_sender',
  3817. area: 'Integration::Nagios',
  3818. description: __('Defines the sender email address of Nagios emails.'),
  3819. options: {
  3820. form: [
  3821. {
  3822. display: '',
  3823. null: false,
  3824. name: 'nagios_sender',
  3825. tag: 'input',
  3826. placeholder: 'nagios@monitoring.example.com',
  3827. },
  3828. ],
  3829. },
  3830. state: 'nagios@monitoring.example.com',
  3831. preferences: {
  3832. prio: 2,
  3833. permission: ['admin.integration'],
  3834. },
  3835. frontend: false,
  3836. )
  3837. Setting.create_if_not_exists(
  3838. title: __('Auto close'),
  3839. name: 'nagios_auto_close',
  3840. area: 'Integration::Nagios',
  3841. description: __('Defines if tickets should be closed if service is recovered.'),
  3842. options: {
  3843. form: [
  3844. {
  3845. display: '',
  3846. null: true,
  3847. name: 'nagios_auto_close',
  3848. tag: 'boolean',
  3849. options: {
  3850. true => 'yes',
  3851. false => 'no',
  3852. },
  3853. },
  3854. ],
  3855. },
  3856. state: true,
  3857. preferences: {
  3858. prio: 3,
  3859. permission: ['admin.integration'],
  3860. },
  3861. frontend: false
  3862. )
  3863. Setting.create_if_not_exists(
  3864. title: __('Auto-close state'),
  3865. name: 'nagios_auto_close_state_id',
  3866. area: 'Integration::Nagios',
  3867. description: __('Defines the state of auto-closed tickets.'),
  3868. options: {
  3869. form: [
  3870. {
  3871. display: '',
  3872. null: false,
  3873. name: 'nagios_auto_close_state_id',
  3874. tag: 'select',
  3875. relation: 'TicketState',
  3876. },
  3877. ],
  3878. },
  3879. state: 4,
  3880. preferences: {
  3881. prio: 4,
  3882. permission: ['admin.integration'],
  3883. },
  3884. frontend: false
  3885. )
  3886. Setting.create_if_not_exists(
  3887. title: __('Checkmk integration'),
  3888. name: 'check_mk_integration',
  3889. area: 'Integration::Switch',
  3890. description: __('Defines if Checkmk (https://checkmk.com/) is enabled or not.'),
  3891. options: {
  3892. form: [
  3893. {
  3894. display: '',
  3895. null: true,
  3896. name: 'check_mk_integration',
  3897. tag: 'boolean',
  3898. options: {
  3899. true => 'yes',
  3900. false => 'no',
  3901. },
  3902. },
  3903. ],
  3904. },
  3905. state: false,
  3906. preferences: {
  3907. prio: 1,
  3908. permission: ['admin.integration'],
  3909. },
  3910. frontend: false
  3911. )
  3912. Setting.create_if_not_exists(
  3913. title: __('Group'),
  3914. name: 'check_mk_group_id',
  3915. area: 'Integration::CheckMK',
  3916. description: __('Defines the group of created tickets.'),
  3917. options: {
  3918. form: [
  3919. {
  3920. display: '',
  3921. null: false,
  3922. name: 'check_mk_group_id',
  3923. tag: 'select',
  3924. relation: 'Group',
  3925. },
  3926. ],
  3927. },
  3928. state: 1,
  3929. preferences: {
  3930. prio: 2,
  3931. permission: ['admin.integration'],
  3932. },
  3933. frontend: false
  3934. )
  3935. Setting.create_if_not_exists(
  3936. title: __('Auto close'),
  3937. name: 'check_mk_auto_close',
  3938. area: 'Integration::CheckMK',
  3939. description: __('Defines if tickets should be closed if service is recovered.'),
  3940. options: {
  3941. form: [
  3942. {
  3943. display: '',
  3944. null: true,
  3945. name: 'check_mk_auto_close',
  3946. tag: 'boolean',
  3947. options: {
  3948. true => 'yes',
  3949. false => 'no',
  3950. },
  3951. },
  3952. ],
  3953. },
  3954. state: true,
  3955. preferences: {
  3956. prio: 3,
  3957. permission: ['admin.integration'],
  3958. },
  3959. frontend: false
  3960. )
  3961. Setting.create_if_not_exists(
  3962. title: __('Auto-close state'),
  3963. name: 'check_mk_auto_close_state_id',
  3964. area: 'Integration::CheckMK',
  3965. description: __('Defines the state of auto-closed tickets.'),
  3966. options: {
  3967. form: [
  3968. {
  3969. display: '',
  3970. null: false,
  3971. name: 'check_mk_auto_close_state_id',
  3972. tag: 'select',
  3973. relation: 'TicketState',
  3974. },
  3975. ],
  3976. },
  3977. state: 4,
  3978. preferences: {
  3979. prio: 4,
  3980. permission: ['admin.integration'],
  3981. },
  3982. frontend: false
  3983. )
  3984. Setting.create_if_not_exists(
  3985. title: __('Checkmk token'),
  3986. name: 'check_mk_token',
  3987. area: 'Core',
  3988. description: __('Defines the Checkmk token for allowing updates.'),
  3989. options: {},
  3990. state: ENV['CHECK_MK_TOKEN'] || SecureRandom.hex(16),
  3991. preferences: {
  3992. permission: ['admin.integration'],
  3993. },
  3994. frontend: false
  3995. )
  3996. Setting.create_if_not_exists(
  3997. title: __('Monit integration'),
  3998. name: 'monit_integration',
  3999. area: 'Integration::Switch',
  4000. description: __('Defines if Monit (https://mmonit.com/monit/) is enabled or not.'),
  4001. options: {
  4002. form: [
  4003. {
  4004. display: '',
  4005. null: true,
  4006. name: 'monit_integration',
  4007. tag: 'boolean',
  4008. options: {
  4009. true => 'yes',
  4010. false => 'no',
  4011. },
  4012. },
  4013. ],
  4014. },
  4015. state: false,
  4016. preferences: {
  4017. prio: 1,
  4018. permission: ['admin.integration'],
  4019. },
  4020. frontend: false
  4021. )
  4022. Setting.create_if_not_exists(
  4023. title: __('Sender'),
  4024. name: 'monit_sender',
  4025. area: 'Integration::Monit',
  4026. description: __('Defines the sender email address of the service emails.'),
  4027. options: {
  4028. form: [
  4029. {
  4030. display: '',
  4031. null: false,
  4032. name: 'monit_sender',
  4033. tag: 'input',
  4034. placeholder: 'monit@monitoring.example.com',
  4035. },
  4036. ],
  4037. },
  4038. state: 'monit@monitoring.example.com',
  4039. preferences: {
  4040. prio: 2,
  4041. permission: ['admin.integration'],
  4042. },
  4043. frontend: false,
  4044. )
  4045. Setting.create_if_not_exists(
  4046. title: __('Auto close'),
  4047. name: 'monit_auto_close',
  4048. area: 'Integration::Monit',
  4049. description: __('Defines if tickets should be closed if service is recovered.'),
  4050. options: {
  4051. form: [
  4052. {
  4053. display: '',
  4054. null: true,
  4055. name: 'monit_auto_close',
  4056. tag: 'boolean',
  4057. options: {
  4058. true => 'yes',
  4059. false => 'no',
  4060. },
  4061. translate: true,
  4062. },
  4063. ],
  4064. },
  4065. state: true,
  4066. preferences: {
  4067. prio: 3,
  4068. permission: ['admin.integration'],
  4069. },
  4070. frontend: false
  4071. )
  4072. Setting.create_if_not_exists(
  4073. title: __('Auto-close state'),
  4074. name: 'monit_auto_close_state_id',
  4075. area: 'Integration::Monit',
  4076. description: __('Defines the state of auto-closed tickets.'),
  4077. options: {
  4078. form: [
  4079. {
  4080. display: '',
  4081. null: false,
  4082. name: 'monit_auto_close_state_id',
  4083. tag: 'select',
  4084. relation: 'TicketState',
  4085. translate: true,
  4086. },
  4087. ],
  4088. },
  4089. state: 4,
  4090. preferences: {
  4091. prio: 4,
  4092. permission: ['admin.integration'],
  4093. },
  4094. frontend: false
  4095. )
  4096. Setting.create_if_not_exists(
  4097. title: __('LDAP integration'),
  4098. name: 'ldap_integration',
  4099. area: 'Integration::Switch',
  4100. description: __('Defines if LDAP is enabled or not.'),
  4101. options: {
  4102. form: [
  4103. {
  4104. display: '',
  4105. null: true,
  4106. name: 'ldap_integration',
  4107. tag: 'boolean',
  4108. options: {
  4109. true => 'yes',
  4110. false => 'no',
  4111. },
  4112. },
  4113. ],
  4114. },
  4115. state: false,
  4116. preferences: {
  4117. prio: 1,
  4118. authentication: true,
  4119. permission: ['admin.integration'],
  4120. },
  4121. frontend: true
  4122. )
  4123. Setting.create_if_not_exists(
  4124. title: __('Exchange config'),
  4125. name: 'exchange_config',
  4126. area: 'Integration::Exchange',
  4127. description: __('Defines the Exchange config.'),
  4128. options: {},
  4129. state: {},
  4130. preferences: {
  4131. prio: 2,
  4132. permission: ['admin.integration'],
  4133. },
  4134. frontend: false,
  4135. )
  4136. Setting.create_if_not_exists(
  4137. title: __('Exchange integration'),
  4138. name: 'exchange_integration',
  4139. area: 'Integration::Switch',
  4140. description: __('Defines if Exchange is enabled or not.'),
  4141. options: {
  4142. form: [
  4143. {
  4144. display: '',
  4145. null: true,
  4146. name: 'exchange_integration',
  4147. tag: 'boolean',
  4148. options: {
  4149. true => 'yes',
  4150. false => 'no',
  4151. },
  4152. },
  4153. ],
  4154. },
  4155. state: false,
  4156. preferences: {
  4157. prio: 1,
  4158. authentication: true,
  4159. permission: ['admin.integration'],
  4160. },
  4161. frontend: true
  4162. )
  4163. Setting.create_if_not_exists(
  4164. title: __('i-doit integration'),
  4165. name: 'idoit_integration',
  4166. area: 'Integration::Switch',
  4167. description: __('Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not.'),
  4168. options: {
  4169. form: [
  4170. {
  4171. display: '',
  4172. null: true,
  4173. name: 'idoit_integration',
  4174. tag: 'boolean',
  4175. options: {
  4176. true => 'yes',
  4177. false => 'no',
  4178. },
  4179. },
  4180. ],
  4181. },
  4182. state: false,
  4183. preferences: {
  4184. prio: 1,
  4185. authentication: true,
  4186. permission: ['admin.integration'],
  4187. },
  4188. frontend: true
  4189. )
  4190. Setting.create_if_not_exists(
  4191. title: __('i-doit config'),
  4192. name: 'idoit_config',
  4193. area: 'Integration::Idoit',
  4194. description: __('Defines the i-doit config.'),
  4195. options: {},
  4196. state: {},
  4197. preferences: {
  4198. prio: 2,
  4199. permission: ['admin.integration'],
  4200. },
  4201. frontend: false,
  4202. )
  4203. Setting.create_if_not_exists(
  4204. title: __('GitLab integration'),
  4205. name: 'gitlab_integration',
  4206. area: 'Integration::Switch',
  4207. description: __('Defines if the GitLab (http://www.gitlab.com) integration is enabled or not.'),
  4208. options: {
  4209. form: [
  4210. {
  4211. display: '',
  4212. null: true,
  4213. name: 'gitlab_integration',
  4214. tag: 'boolean',
  4215. options: {
  4216. true => 'yes',
  4217. false => 'no',
  4218. },
  4219. },
  4220. ],
  4221. },
  4222. state: false,
  4223. preferences: {
  4224. prio: 1,
  4225. authentication: true,
  4226. permission: ['admin.integration'],
  4227. },
  4228. frontend: true
  4229. )
  4230. Setting.create_if_not_exists(
  4231. title: __('GitLab config'),
  4232. name: 'gitlab_config',
  4233. area: 'Integration::GitLab',
  4234. description: __('Stores the GitLab configuration.'),
  4235. options: {},
  4236. state: {
  4237. endpoint: 'https://gitlab.com/api/graphql',
  4238. },
  4239. preferences: {
  4240. prio: 2,
  4241. permission: ['admin.integration'],
  4242. },
  4243. frontend: false,
  4244. )
  4245. Setting.create_if_not_exists(
  4246. title: __('GitHub integration'),
  4247. name: 'github_integration',
  4248. area: 'Integration::Switch',
  4249. description: __('Defines if the GitHub (http://www.github.com) integration is enabled or not.'),
  4250. options: {
  4251. form: [
  4252. {
  4253. display: '',
  4254. null: true,
  4255. name: 'github_integration',
  4256. tag: 'boolean',
  4257. options: {
  4258. true => 'yes',
  4259. false => 'no',
  4260. },
  4261. },
  4262. ],
  4263. },
  4264. state: false,
  4265. preferences: {
  4266. prio: 1,
  4267. authentication: true,
  4268. permission: ['admin.integration'],
  4269. },
  4270. frontend: true
  4271. )
  4272. Setting.create_if_not_exists(
  4273. title: __('GitHub config'),
  4274. name: 'github_config',
  4275. area: 'Integration::GitHub',
  4276. description: __('Stores the GitHub configuration.'),
  4277. options: {},
  4278. state: {
  4279. endpoint: 'https://api.github.com/graphql',
  4280. },
  4281. preferences: {
  4282. prio: 2,
  4283. permission: ['admin.integration'],
  4284. },
  4285. frontend: false,
  4286. )
  4287. Setting.create_if_not_exists(
  4288. title: __('Defines sync transaction backend.'),
  4289. name: '0100_trigger',
  4290. area: 'Transaction::Backend::Sync',
  4291. description: __('Defines the transaction backend to execute triggers.'),
  4292. options: {},
  4293. state: 'Transaction::Trigger',
  4294. frontend: false
  4295. )
  4296. Setting.create_if_not_exists(
  4297. title: __('Defines transaction backend.'),
  4298. name: '0100_notification',
  4299. area: 'Transaction::Backend::Async',
  4300. description: __('Defines the transaction backend to send agent notifications.'),
  4301. options: {},
  4302. state: 'Transaction::Notification',
  4303. frontend: false
  4304. )
  4305. Setting.create_if_not_exists(
  4306. title: __('Defines transaction backend.'),
  4307. name: '1000_signature_detection',
  4308. area: 'Transaction::Backend::Async',
  4309. description: __('Defines the transaction backend to detect customer signatures in emails.'),
  4310. options: {},
  4311. state: 'Transaction::SignatureDetection',
  4312. frontend: false
  4313. )
  4314. Setting.create_if_not_exists(
  4315. title: __('Defines transaction backend.'),
  4316. name: '6000_slack_webhook',
  4317. area: 'Transaction::Backend::Async',
  4318. description: __('Defines the transaction backend which posts messages to Slack (http://www.slack.com).'),
  4319. options: {},
  4320. state: 'Transaction::Slack',
  4321. frontend: false
  4322. )
  4323. Setting.create_if_not_exists(
  4324. title: __('Slack integration'),
  4325. name: 'slack_integration',
  4326. area: 'Integration::Switch',
  4327. description: __('Defines if Slack (http://www.slack.org) is enabled or not.'),
  4328. options: {
  4329. form: [
  4330. {
  4331. display: '',
  4332. null: true,
  4333. name: 'slack_integration',
  4334. tag: 'boolean',
  4335. options: {
  4336. true => 'yes',
  4337. false => 'no',
  4338. },
  4339. },
  4340. ],
  4341. },
  4342. state: false,
  4343. preferences: {
  4344. prio: 1,
  4345. permission: ['admin.integration'],
  4346. },
  4347. frontend: false
  4348. )
  4349. Setting.create_if_not_exists(
  4350. title: __('Slack config'),
  4351. name: 'slack_config',
  4352. area: 'Integration::Slack',
  4353. description: __('Defines the Slack config.'),
  4354. options: {},
  4355. state: {
  4356. items: []
  4357. },
  4358. preferences: {
  4359. prio: 2,
  4360. permission: ['admin.integration'],
  4361. },
  4362. frontend: false,
  4363. )
  4364. Setting.create_if_not_exists(
  4365. title: __('sipgate.io integration'),
  4366. name: 'sipgate_integration',
  4367. area: 'Integration::Switch',
  4368. description: __('Defines if sipgate.io (http://www.sipgate.io) is enabled or not.'),
  4369. options: {
  4370. form: [
  4371. {
  4372. display: '',
  4373. null: true,
  4374. name: 'sipgate_integration',
  4375. tag: 'boolean',
  4376. options: {
  4377. true => 'yes',
  4378. false => 'no',
  4379. },
  4380. },
  4381. ],
  4382. },
  4383. state: false,
  4384. preferences: {
  4385. prio: 1,
  4386. trigger: ['menu:render', 'cti:reload'],
  4387. authentication: true,
  4388. permission: ['admin.integration'],
  4389. },
  4390. frontend: true
  4391. )
  4392. Setting.create_if_not_exists(
  4393. title: __('sipgate.io Token'),
  4394. name: 'sipgate_token',
  4395. area: 'Integration::Sipgate',
  4396. description: __('Token for Sipgate.'),
  4397. options: {
  4398. form: [
  4399. {
  4400. display: '',
  4401. null: false,
  4402. name: 'sipgate_token',
  4403. tag: 'input',
  4404. },
  4405. ],
  4406. },
  4407. state: ENV['SIPGATE_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4408. preferences: {
  4409. permission: ['admin.integration'],
  4410. },
  4411. frontend: false
  4412. )
  4413. Setting.create_if_not_exists(
  4414. title: __('sipgate.io config'),
  4415. name: 'sipgate_config',
  4416. area: 'Integration::Sipgate',
  4417. description: __('Defines the sipgate.io config.'),
  4418. options: {},
  4419. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4420. preferences: {
  4421. prio: 2,
  4422. permission: ['admin.integration'],
  4423. },
  4424. frontend: false,
  4425. )
  4426. Setting.create_if_not_exists(
  4427. title: __('sipgate.io alternative FQDN'),
  4428. name: 'sipgate_alternative_fqdn',
  4429. area: 'Integration::Sipgate::Expert',
  4430. description: __('Alternative FQDN for callbacks if you operate Zammad in an internal network.'),
  4431. options: {
  4432. form: [
  4433. {
  4434. display: '',
  4435. null: false,
  4436. name: 'sipgate_alternative_fqdn',
  4437. tag: 'input',
  4438. },
  4439. ],
  4440. },
  4441. state: '',
  4442. preferences: {
  4443. permission: ['admin.integration'],
  4444. },
  4445. frontend: false
  4446. )
  4447. Setting.create_if_not_exists(
  4448. title: __('CTI integration'),
  4449. name: 'cti_integration',
  4450. area: 'Integration::Switch',
  4451. description: __('Defines if generic CTI integration is enabled or not.'),
  4452. options: {
  4453. form: [
  4454. {
  4455. display: '',
  4456. null: true,
  4457. name: 'cti_integration',
  4458. tag: 'boolean',
  4459. options: {
  4460. true => 'yes',
  4461. false => 'no',
  4462. },
  4463. },
  4464. ],
  4465. },
  4466. state: false,
  4467. preferences: {
  4468. prio: 1,
  4469. trigger: ['menu:render', 'cti:reload'],
  4470. authentication: true,
  4471. permission: ['admin.integration'],
  4472. },
  4473. frontend: true
  4474. )
  4475. Setting.create_if_not_exists(
  4476. title: __('CTI config'),
  4477. name: 'cti_config',
  4478. area: 'Integration::Cti',
  4479. description: __('Defines the CTI config.'),
  4480. options: {},
  4481. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4482. preferences: {
  4483. prio: 2,
  4484. permission: ['admin.integration'],
  4485. },
  4486. frontend: false,
  4487. )
  4488. Setting.create_if_not_exists(
  4489. title: __('CTI Token'),
  4490. name: 'cti_token',
  4491. area: 'Integration::Cti',
  4492. description: __('Token for CTI.'),
  4493. options: {
  4494. form: [
  4495. {
  4496. display: '',
  4497. null: false,
  4498. name: 'cti_token',
  4499. tag: 'input',
  4500. },
  4501. ],
  4502. },
  4503. state: ENV['CTI_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4504. preferences: {
  4505. permission: ['admin.integration'],
  4506. },
  4507. frontend: false
  4508. )
  4509. Setting.create_if_not_exists(
  4510. title: __('CTI customer last activity'),
  4511. name: 'cti_customer_last_activity',
  4512. area: 'Integration::Cti',
  4513. description: __('Defines the duration of customer activity (in seconds) on a call until the user profile dialog is shown.'),
  4514. options: {},
  4515. state: 30.days,
  4516. preferences: {
  4517. prio: 2,
  4518. permission: ['admin.integration'],
  4519. },
  4520. frontend: false,
  4521. )
  4522. Setting.create_if_not_exists(
  4523. title: __('Placetel integration'),
  4524. name: 'placetel_integration',
  4525. area: 'Integration::Switch',
  4526. description: __('Defines if Placetel (http://www.placetel.de) is enabled or not.'),
  4527. options: {
  4528. form: [
  4529. {
  4530. display: '',
  4531. null: true,
  4532. name: 'placetel_integration',
  4533. tag: 'boolean',
  4534. options: {
  4535. true => 'yes',
  4536. false => 'no',
  4537. },
  4538. },
  4539. ],
  4540. },
  4541. state: false,
  4542. preferences: {
  4543. prio: 1,
  4544. trigger: ['menu:render', 'cti:reload'],
  4545. authentication: true,
  4546. permission: ['admin.integration'],
  4547. },
  4548. frontend: true
  4549. )
  4550. Setting.create_if_not_exists(
  4551. title: __('Placetel config'),
  4552. name: 'placetel_config',
  4553. area: 'Integration::Placetel',
  4554. description: __('Defines the Placetel config.'),
  4555. options: {},
  4556. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4557. preferences: {
  4558. prio: 2,
  4559. permission: ['admin.integration'],
  4560. cache: ['placetelGetVoipUsers'],
  4561. },
  4562. frontend: false,
  4563. )
  4564. Setting.create_if_not_exists(
  4565. title: __('Placetel Token'),
  4566. name: 'placetel_token',
  4567. area: 'Integration::Placetel',
  4568. description: __('Defines the token for Placetel.'),
  4569. options: {
  4570. form: [
  4571. {
  4572. display: '',
  4573. null: false,
  4574. name: 'placetel_token',
  4575. tag: 'input',
  4576. },
  4577. ],
  4578. },
  4579. state: ENV['PLACETEL_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4580. preferences: {
  4581. permission: ['admin.integration'],
  4582. },
  4583. frontend: false
  4584. )
  4585. Setting.create_if_not_exists(
  4586. title: __('Clearbit integration'),
  4587. name: 'clearbit_integration',
  4588. area: 'Integration::Switch',
  4589. description: __('Defines if Clearbit (http://www.clearbit.com) is enabled or not.'),
  4590. options: {
  4591. form: [
  4592. {
  4593. display: '',
  4594. null: true,
  4595. name: 'clearbit_integration',
  4596. tag: 'boolean',
  4597. options: {
  4598. true => 'yes',
  4599. false => 'no',
  4600. },
  4601. },
  4602. ],
  4603. },
  4604. state: false,
  4605. preferences: {
  4606. prio: 1,
  4607. permission: ['admin.integration'],
  4608. },
  4609. frontend: false
  4610. )
  4611. Setting.create_if_not_exists(
  4612. title: __('Clearbit config'),
  4613. name: 'clearbit_config',
  4614. area: 'Integration::Clearbit',
  4615. description: __('Defines the Clearbit config.'),
  4616. options: {},
  4617. state: {},
  4618. frontend: false,
  4619. preferences: {
  4620. prio: 2,
  4621. permission: ['admin.integration'],
  4622. },
  4623. )
  4624. Setting.create_if_not_exists(
  4625. title: __('Defines transaction backend.'),
  4626. name: '9000_clearbit_enrichment',
  4627. area: 'Transaction::Backend::Async',
  4628. description: __('Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com).'),
  4629. options: {},
  4630. state: 'Transaction::ClearbitEnrichment',
  4631. frontend: false
  4632. )
  4633. Setting.create_if_not_exists(
  4634. title: __('Defines transaction backend.'),
  4635. name: '9100_cti_caller_id_detection',
  4636. area: 'Transaction::Backend::Async',
  4637. description: __('Defines the transaction backend which detects caller IDs in objects and stores them for CTI lookups.'),
  4638. options: {},
  4639. state: 'Transaction::CtiCallerIdDetection',
  4640. frontend: false
  4641. )
  4642. Setting.create_if_not_exists(
  4643. title: __('Defines transaction backend.'),
  4644. name: '9200_karma',
  4645. area: 'Transaction::Backend::Async',
  4646. description: __('Defines the transaction backend which creates the karma score.'),
  4647. options: {},
  4648. state: 'Transaction::Karma',
  4649. frontend: false
  4650. )
  4651. Setting.create_if_not_exists(
  4652. title: __('Defines karma levels.'),
  4653. name: 'karma_levels',
  4654. area: 'Core::Karma',
  4655. description: __('Defines the karma levels.'),
  4656. options: {},
  4657. state: [
  4658. {
  4659. name: __('Beginner'),
  4660. start: 0,
  4661. end: 499,
  4662. },
  4663. {
  4664. name: __('Newbie'),
  4665. start: 500,
  4666. end: 1999,
  4667. },
  4668. {
  4669. name: __('Intermediate'),
  4670. start: 2000,
  4671. end: 4999,
  4672. },
  4673. {
  4674. name: __('Professional'),
  4675. start: 5000,
  4676. end: 6999,
  4677. },
  4678. {
  4679. name: __('Expert'),
  4680. start: 7000,
  4681. end: 8999,
  4682. },
  4683. {
  4684. name: __('Master'),
  4685. start: 9000,
  4686. end: 18_999,
  4687. },
  4688. {
  4689. name: __('Evangelist'),
  4690. start: 19_000,
  4691. end: 49_999,
  4692. },
  4693. {
  4694. name: __('Hero'),
  4695. start: 50_000,
  4696. end: nil,
  4697. },
  4698. ],
  4699. frontend: false
  4700. )
  4701. Setting.create_if_not_exists(
  4702. title: __('Set agent limit'),
  4703. name: 'system_agent_limit',
  4704. area: 'Core::Online',
  4705. description: __('Defines the agent limit.'),
  4706. options: {},
  4707. state: false,
  4708. preferences: { online_service_disable: true },
  4709. frontend: false
  4710. )
  4711. Setting.create_if_not_exists(
  4712. title: __('HTML Email CSS Font'),
  4713. name: 'html_email_css_font',
  4714. area: 'Core',
  4715. description: __('Defines the CSS font information for HTML emails.'),
  4716. options: {},
  4717. state: "font-family:'Helvetica Neue', Helvetica, Arial, Geneva, sans-serif; font-size: 12px;",
  4718. preferences: {
  4719. permission: ['admin'],
  4720. },
  4721. frontend: false
  4722. )
  4723. # add the dashboard stats backend for 'Stats::TicketWaitingTime'
  4724. Setting.create_if_not_exists(
  4725. title: __('Stats Backend'),
  4726. name: 'Stats::TicketWaitingTime',
  4727. area: 'Dashboard::Stats',
  4728. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4729. options: {},
  4730. state: 'Stats::TicketWaitingTime',
  4731. preferences: {
  4732. permission: ['ticket.agent'],
  4733. prio: 1,
  4734. },
  4735. frontend: false
  4736. )
  4737. # add the dashboard stats backend for 'Stats::TicketEscalation'
  4738. Setting.create_if_not_exists(
  4739. title: __('Stats Backend'),
  4740. name: 'Stats::TicketEscalation',
  4741. area: 'Dashboard::Stats',
  4742. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4743. options: {},
  4744. state: 'Stats::TicketEscalation',
  4745. preferences: {
  4746. permission: ['ticket.agent'],
  4747. prio: 2,
  4748. },
  4749. frontend: false
  4750. )
  4751. # add the dashboard stats backend for 'Stats::TicketChannelDistribution'
  4752. Setting.create_if_not_exists(
  4753. title: __('Stats Backend'),
  4754. name: 'Stats::TicketChannelDistribution',
  4755. area: 'Dashboard::Stats',
  4756. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4757. options: {},
  4758. state: 'Stats::TicketChannelDistribution',
  4759. preferences: {
  4760. permission: ['ticket.agent'],
  4761. prio: 3,
  4762. },
  4763. frontend: false
  4764. )
  4765. # add the dashboard stats backend for 'Stats::TicketLoadMeasure'
  4766. Setting.create_if_not_exists(
  4767. title: __('Stats Backend'),
  4768. name: 'Stats::TicketLoadMeasure',
  4769. area: 'Dashboard::Stats',
  4770. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4771. options: {},
  4772. state: 'Stats::TicketLoadMeasure',
  4773. preferences: {
  4774. permission: ['ticket.agent'],
  4775. prio: 4,
  4776. },
  4777. frontend: false
  4778. )
  4779. # add the dashboard stats backend for 'Stats::TicketInProcess'
  4780. Setting.create_if_not_exists(
  4781. title: __('Stats Backend'),
  4782. name: 'Stats::TicketInProcess',
  4783. area: 'Dashboard::Stats',
  4784. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4785. options: {},
  4786. state: 'Stats::TicketInProcess',
  4787. preferences: {
  4788. permission: ['ticket.agent'],
  4789. prio: 5,
  4790. },
  4791. frontend: false
  4792. )
  4793. # add the dashboard stats backend for 'Stats::TicketReopen'
  4794. Setting.create_if_not_exists(
  4795. title: __('Stats Backend'),
  4796. name: 'Stats::TicketReopen',
  4797. area: 'Dashboard::Stats',
  4798. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4799. options: {},
  4800. state: 'Stats::TicketReopen',
  4801. preferences: {
  4802. permission: ['ticket.agent'],
  4803. prio: 6,
  4804. },
  4805. frontend: false
  4806. )
  4807. Setting.create_if_not_exists(
  4808. title: __('Knowledge Base multilingual support'),
  4809. name: 'kb_multi_lingual_support',
  4810. area: 'Kb::Core',
  4811. description: __('Support of multilingual Knowledge Base.'),
  4812. options: {},
  4813. state: true,
  4814. preferences: { online_service_disable: true },
  4815. frontend: true
  4816. )
  4817. Setting.create_if_not_exists(
  4818. title: __('Knowledge Base active'),
  4819. name: 'kb_active',
  4820. area: 'Kb::Core',
  4821. description: __('Defines if Knowledge Base navbar button is enabled.'),
  4822. state: true,
  4823. preferences: {
  4824. prio: 1,
  4825. trigger: ['menu:render'],
  4826. authentication: true,
  4827. permission: ['admin.knowledge_base'],
  4828. },
  4829. frontend: true
  4830. )
  4831. Setting.create_if_not_exists(
  4832. title: __('Knowledge Base active publicly'),
  4833. name: 'kb_active_publicly',
  4834. area: 'Kb::Core',
  4835. description: __('Defines if Knowledge Base navbar button is enabled for users without Knowledge Base permission.'),
  4836. state: false,
  4837. preferences: {
  4838. prio: 1,
  4839. trigger: ['menu:render'],
  4840. authentication: true,
  4841. permission: [],
  4842. },
  4843. frontend: true
  4844. )
  4845. Setting.create_if_not_exists(
  4846. title: __('Defines the timeframe during which a self-created note can be deleted.'),
  4847. name: 'ui_ticket_zoom_article_delete_timeframe',
  4848. area: 'UI::TicketZoomArticle',
  4849. description: __("Set timeframe in seconds. If it's set to 0 you can delete notes without time limits"),
  4850. options: {},
  4851. state: 600,
  4852. preferences: {
  4853. permission: ['admin.ui']
  4854. },
  4855. frontend: true
  4856. )
  4857. Setting.create_if_not_exists(
  4858. title: __('S/MIME integration'),
  4859. name: 'smime_integration',
  4860. area: 'Integration::Switch',
  4861. description: __('Defines if S/MIME encryption is enabled or not.'),
  4862. options: {
  4863. form: [
  4864. {
  4865. display: '',
  4866. null: true,
  4867. name: 'smime_integration',
  4868. tag: 'boolean',
  4869. options: {
  4870. true => 'yes',
  4871. false => 'no',
  4872. },
  4873. },
  4874. ],
  4875. },
  4876. state: false,
  4877. preferences: {
  4878. prio: 1,
  4879. authentication: true,
  4880. permission: ['admin.integration'],
  4881. },
  4882. frontend: true
  4883. )
  4884. Setting.create_if_not_exists(
  4885. title: __('S/MIME config'),
  4886. name: 'smime_config',
  4887. area: 'Integration::SMIME',
  4888. description: __('Defines the S/MIME config.'),
  4889. options: {},
  4890. state: {},
  4891. preferences: {
  4892. prio: 2,
  4893. permission: ['admin.integration'],
  4894. },
  4895. frontend: true,
  4896. )
  4897. Setting.create_if_not_exists(
  4898. title: __('Authentication via %s'),
  4899. name: 'auth_sso',
  4900. area: 'Security::ThirdPartyAuthentication',
  4901. description: __('Enables button for user authentication via %s. The button will redirect to /auth/sso on user interaction.'),
  4902. options: {
  4903. form: [
  4904. {
  4905. display: '',
  4906. null: true,
  4907. name: 'auth_sso',
  4908. tag: 'boolean',
  4909. options: {
  4910. true => 'yes',
  4911. false => 'no',
  4912. },
  4913. },
  4914. ],
  4915. },
  4916. preferences: {
  4917. controller: 'SettingsAreaSwitch',
  4918. sub: {},
  4919. title_i18n: ['SSO'],
  4920. description_i18n: ['SSO'],
  4921. permission: ['admin.security'],
  4922. },
  4923. state: false,
  4924. frontend: true
  4925. )