settings.rb 135 KB

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