settings.rb 119 KB

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