settings.rb 133 KB

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