settings.rb 132 KB

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