settings.rb 94 KB

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