settings.rb 154 KB

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