settings.rb 135 KB

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