settings.rb 122 KB

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