settings.rb 155 KB

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