settings.rb 114 KB

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