settings.rb 159 KB

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