settings.rb 159 KB

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