settings.rb 160 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987
  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. display: __('PKCE'),
  2080. null: true,
  2081. default: true,
  2082. name: 'pkce',
  2083. tag: 'select',
  2084. options: {
  2085. true => 'yes',
  2086. false => 'no',
  2087. },
  2088. translate: true,
  2089. help: __('Proof Key for Code Exchange is currently only supporting SHA256 as code challenge method.'),
  2090. },
  2091. {
  2092. display: __('Your callback URL'),
  2093. null: true,
  2094. name: 'callback_url',
  2095. tag: 'auth_provider',
  2096. provider: 'auth_openid_connect',
  2097. },
  2098. ],
  2099. },
  2100. state: {},
  2101. preferences: {
  2102. permission: ['admin.security'],
  2103. },
  2104. frontend: false
  2105. )
  2106. Setting.create_if_not_exists(
  2107. title: __('Minimum length'),
  2108. name: 'password_min_size',
  2109. area: 'Security::Password',
  2110. description: __('Password needs to have at least a minimal number of characters.'),
  2111. options: {
  2112. form: [
  2113. {
  2114. display: '',
  2115. null: true,
  2116. name: 'password_min_size',
  2117. tag: 'select',
  2118. options: {
  2119. 4 => ' 4',
  2120. 5 => ' 5',
  2121. 6 => ' 6',
  2122. 7 => ' 7',
  2123. 8 => ' 8',
  2124. 9 => ' 9',
  2125. 10 => '10',
  2126. 11 => '11',
  2127. 12 => '12',
  2128. 13 => '13',
  2129. 14 => '14',
  2130. 15 => '15',
  2131. 16 => '16',
  2132. 17 => '17',
  2133. 18 => '18',
  2134. 19 => '19',
  2135. 20 => '20',
  2136. },
  2137. },
  2138. ],
  2139. },
  2140. state: 10,
  2141. preferences: {
  2142. permission: ['admin.security'],
  2143. },
  2144. frontend: false
  2145. )
  2146. Setting.create_if_not_exists(
  2147. title: __('2 lower case and 2 upper case characters'),
  2148. name: 'password_min_2_lower_2_upper_characters',
  2149. area: 'Security::Password',
  2150. description: __('Password needs to contain 2 lower case and 2 upper case characters.'),
  2151. options: {
  2152. form: [
  2153. {
  2154. display: '',
  2155. null: true,
  2156. name: 'password_min_2_lower_2_upper_characters',
  2157. tag: 'select',
  2158. options: {
  2159. 1 => 'yes',
  2160. 0 => 'no',
  2161. },
  2162. translate: true,
  2163. },
  2164. ],
  2165. },
  2166. state: 1,
  2167. preferences: {
  2168. permission: ['admin.security'],
  2169. },
  2170. frontend: false
  2171. )
  2172. Setting.create_if_not_exists(
  2173. title: __('Digit required'),
  2174. name: 'password_need_digit',
  2175. area: 'Security::Password',
  2176. description: __('Password needs to contain at least one digit.'),
  2177. options: {
  2178. form: [
  2179. {
  2180. display: __('Needed'),
  2181. null: true,
  2182. name: 'password_need_digit',
  2183. tag: 'select',
  2184. options: {
  2185. 1 => 'yes',
  2186. 0 => 'no',
  2187. },
  2188. translate: true,
  2189. },
  2190. ],
  2191. },
  2192. state: 1,
  2193. preferences: {
  2194. permission: ['admin.security'],
  2195. },
  2196. frontend: false
  2197. )
  2198. Setting.create_if_not_exists(
  2199. title: __('Special character required'),
  2200. name: 'password_need_special_character',
  2201. area: 'Security::Password',
  2202. description: __('Password needs to contain at least one special character.'),
  2203. options: {
  2204. form: [
  2205. {
  2206. display: __('Needed'),
  2207. null: true,
  2208. name: 'password_need_special_character',
  2209. tag: 'select',
  2210. options: {
  2211. 1 => 'yes',
  2212. 0 => 'no',
  2213. },
  2214. translate: true,
  2215. },
  2216. ],
  2217. },
  2218. state: 0,
  2219. preferences: {
  2220. permission: ['admin.security'],
  2221. },
  2222. frontend: false
  2223. )
  2224. Setting.create_if_not_exists(
  2225. title: __('Maximum failed logins'),
  2226. name: 'password_max_login_failed',
  2227. area: 'Security::Password',
  2228. description: __('Defines after how many failed logins accounts will be deactivated.'),
  2229. options: {
  2230. form: [
  2231. {
  2232. display: '',
  2233. null: true,
  2234. name: 'password_max_login_failed',
  2235. tag: 'select',
  2236. options: {
  2237. 4 => ' 4',
  2238. 5 => ' 5',
  2239. 6 => ' 6',
  2240. 7 => ' 7',
  2241. 8 => ' 8',
  2242. 9 => ' 9',
  2243. 10 => '10',
  2244. 11 => '11',
  2245. 13 => '13',
  2246. 14 => '14',
  2247. 15 => '15',
  2248. 16 => '16',
  2249. 17 => '17',
  2250. 18 => '18',
  2251. 19 => '19',
  2252. 20 => '20',
  2253. },
  2254. },
  2255. ],
  2256. },
  2257. state: 5,
  2258. preferences: {
  2259. authentication: true,
  2260. permission: ['admin.security'],
  2261. },
  2262. frontend: true
  2263. )
  2264. Setting.create_if_not_exists(
  2265. title: __('Ticket Hook'),
  2266. name: 'ticket_hook',
  2267. area: 'Ticket::Base',
  2268. description: __('The identifier for a ticket, e.g. Ticket#, Call#, MyTicket#. The default is Ticket#.'),
  2269. options: {
  2270. form: [
  2271. {
  2272. display: '',
  2273. null: false,
  2274. name: 'ticket_hook',
  2275. tag: 'input',
  2276. },
  2277. ],
  2278. },
  2279. preferences: {
  2280. prio: 1000,
  2281. render: true,
  2282. placeholder: true,
  2283. authentication: true,
  2284. permission: ['admin.ticket'],
  2285. },
  2286. state: 'Ticket#',
  2287. frontend: true
  2288. )
  2289. Setting.create_if_not_exists(
  2290. title: __('Ticket Hook Divider'),
  2291. name: 'ticket_hook_divider',
  2292. area: 'Ticket::Base::Shadow',
  2293. description: __('The divider between TicketHook and ticket number. E. g. \': \'.'),
  2294. options: {
  2295. form: [
  2296. {
  2297. display: '',
  2298. null: true,
  2299. name: 'ticket_hook_divider',
  2300. tag: 'input',
  2301. },
  2302. ],
  2303. },
  2304. state: '',
  2305. preferences: {
  2306. permission: ['admin.ticket'],
  2307. },
  2308. frontend: false
  2309. )
  2310. Setting.create_if_not_exists(
  2311. title: __('Ticket Hook Position'),
  2312. name: 'ticket_hook_position',
  2313. area: 'Ticket::Base',
  2314. description: __("The format of the subject.
  2315. * **Right** means **Some Subject [Ticket#12345]**
  2316. * **Left** means **[Ticket#12345] Some Subject**
  2317. * **None** means **Some Subject** (without ticket number), in which case it recognizes follow-ups based on email headers."),
  2318. options: {
  2319. form: [
  2320. {
  2321. display: '',
  2322. null: true,
  2323. name: 'ticket_hook_position',
  2324. tag: 'select',
  2325. translate: true,
  2326. options: {
  2327. 'left' => __('left'),
  2328. 'right' => __('right'),
  2329. 'none' => __('none'),
  2330. },
  2331. },
  2332. ],
  2333. },
  2334. state: 'right',
  2335. preferences: {
  2336. prio: 2000,
  2337. controller: 'SettingsAreaTicketHookPosition',
  2338. permission: ['admin.ticket'],
  2339. },
  2340. frontend: false
  2341. )
  2342. Setting.create_if_not_exists(
  2343. title: __('Ticket Last Contact Behaviour'),
  2344. name: 'ticket_last_contact_behaviour',
  2345. area: 'Ticket::Base',
  2346. description: __('Defines how the last customer contact time of tickets should be calculated.'),
  2347. options: {
  2348. form: [
  2349. {
  2350. display: '',
  2351. null: true,
  2352. name: 'ticket_last_contact_behaviour',
  2353. tag: 'select',
  2354. translate: true,
  2355. options: {
  2356. 'based_on_customer_reaction' => __('Use the time of the very last customer article.'),
  2357. 'check_if_agent_already_replied' => __('Use the start time of the last customer thread (which may consist of multiple articles).'),
  2358. },
  2359. },
  2360. ],
  2361. },
  2362. state: 'check_if_agent_already_replied',
  2363. preferences: {
  2364. prio: 3000,
  2365. permission: ['admin.ticket'],
  2366. },
  2367. frontend: false
  2368. )
  2369. Setting.create_if_not_exists(
  2370. title: __('Ticket Conditions Expert Mode'),
  2371. name: 'ticket_allow_expert_conditions',
  2372. area: 'Ticket::Core',
  2373. description: __('Defines if the ticket conditions editor supports complex logical expressions.'),
  2374. options: {
  2375. form: [
  2376. {
  2377. display: '',
  2378. null: true,
  2379. name: 'ticket_allow_expert_conditions',
  2380. tag: 'boolean',
  2381. options: {
  2382. true => __('yes'),
  2383. false => __('no'),
  2384. },
  2385. },
  2386. ],
  2387. },
  2388. state: true,
  2389. preferences: {
  2390. online_service_disable: true,
  2391. permission: ['admin.ticket'],
  2392. },
  2393. frontend: true
  2394. )
  2395. Setting.create_if_not_exists(
  2396. title: __('Ticket Conditions Regular Expression Operators'),
  2397. name: 'ticket_conditions_allow_regular_expression_operators',
  2398. area: 'Ticket::Core',
  2399. description: __('Defines if the ticket conditions editor supports regular expression operators for triggers and ticket auto assignment.'),
  2400. options: {
  2401. form: [
  2402. {
  2403. display: '',
  2404. null: true,
  2405. name: 'ticket_conditions_allow_regular_expression_operators',
  2406. tag: 'boolean',
  2407. options: {
  2408. true => __('yes'),
  2409. false => __('no'),
  2410. },
  2411. },
  2412. ],
  2413. },
  2414. state: true,
  2415. preferences: {
  2416. online_service_disable: true,
  2417. permission: ['admin.ticket'],
  2418. },
  2419. frontend: true
  2420. )
  2421. Setting.create_if_not_exists(
  2422. title: __('Ticket Number Format'),
  2423. name: 'ticket_number',
  2424. area: 'Ticket::Number',
  2425. description: __("Selects the ticket number generator module.
  2426. * **Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  2427. * 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)."),
  2428. options: {
  2429. form: [
  2430. {
  2431. display: '',
  2432. null: true,
  2433. name: 'ticket_number',
  2434. tag: 'select',
  2435. translate: true,
  2436. options: {
  2437. 'Ticket::Number::Increment' => __('Increment (SystemID.Counter)'),
  2438. 'Ticket::Number::Date' => __('Date (Year.Month.Day.SystemID.Counter)'),
  2439. },
  2440. },
  2441. ],
  2442. },
  2443. state: 'Ticket::Number::Increment',
  2444. preferences: {
  2445. settings_included: %w[ticket_number_increment ticket_number_date],
  2446. controller: 'SettingsAreaTicketNumber',
  2447. permission: ['admin.ticket'],
  2448. },
  2449. frontend: false
  2450. )
  2451. Setting.create_if_not_exists(
  2452. title: __('Ticket Number Increment'),
  2453. name: 'ticket_number_increment',
  2454. area: 'Ticket::Number',
  2455. description: '-',
  2456. options: {
  2457. form: [
  2458. {
  2459. display: __('Checksum'),
  2460. null: true,
  2461. name: 'checksum',
  2462. tag: 'boolean',
  2463. options: {
  2464. true => 'yes',
  2465. false => 'no',
  2466. },
  2467. },
  2468. {
  2469. display: __('Min. size of number'),
  2470. null: true,
  2471. name: 'min_size',
  2472. tag: 'select',
  2473. options: {
  2474. 1 => ' 1',
  2475. 2 => ' 2',
  2476. 3 => ' 3',
  2477. 4 => ' 4',
  2478. 5 => ' 5',
  2479. 6 => ' 6',
  2480. 7 => ' 7',
  2481. 8 => ' 8',
  2482. 9 => ' 9',
  2483. 10 => '10',
  2484. 11 => '11',
  2485. 12 => '12',
  2486. 13 => '13',
  2487. 14 => '14',
  2488. 15 => '15',
  2489. 16 => '16',
  2490. 17 => '17',
  2491. 18 => '18',
  2492. 19 => '19',
  2493. 20 => '20',
  2494. },
  2495. },
  2496. ],
  2497. },
  2498. state: {
  2499. checksum: false,
  2500. min_size: 5,
  2501. },
  2502. preferences: {
  2503. permission: ['admin.ticket'],
  2504. hidden: true,
  2505. },
  2506. frontend: false
  2507. )
  2508. Setting.create_if_not_exists(
  2509. title: __('Ticket Number Increment Date'),
  2510. name: 'ticket_number_date',
  2511. area: 'Ticket::Number',
  2512. description: '-',
  2513. options: {
  2514. form: [
  2515. {
  2516. display: __('Checksum'),
  2517. null: true,
  2518. name: 'checksum',
  2519. tag: 'boolean',
  2520. options: {
  2521. true => 'yes',
  2522. false => 'no',
  2523. },
  2524. },
  2525. ],
  2526. },
  2527. state: {
  2528. checksum: false
  2529. },
  2530. preferences: {
  2531. permission: ['admin.ticket'],
  2532. hidden: true,
  2533. },
  2534. frontend: false
  2535. )
  2536. Setting.create_if_not_exists(
  2537. title: __('Auto Assignment'),
  2538. name: 'ticket_auto_assignment',
  2539. area: 'Web::Base',
  2540. description: __('Enable ticket auto assignment.'),
  2541. options: {
  2542. form: [
  2543. {
  2544. display: '',
  2545. null: true,
  2546. name: 'ticket_auto_assignment',
  2547. tag: 'boolean',
  2548. options: {
  2549. true => 'yes',
  2550. false => 'no',
  2551. },
  2552. },
  2553. ],
  2554. },
  2555. preferences: {
  2556. authentication: true,
  2557. permission: ['admin.ticket_auto_assignment'],
  2558. },
  2559. state: false,
  2560. frontend: true
  2561. )
  2562. Setting.create_if_not_exists(
  2563. title: __('Auto Assignment Selector'),
  2564. name: 'ticket_auto_assignment_selector',
  2565. area: 'Web::Base',
  2566. description: __('Enable auto assignment for following matching tickets.'),
  2567. options: {
  2568. form: [
  2569. {},
  2570. ],
  2571. },
  2572. preferences: {
  2573. authentication: true,
  2574. permission: ['admin.ticket_auto_assignment'],
  2575. },
  2576. state: { condition: { 'ticket.state_id' => { operator: 'is', value: Ticket::State.by_category_ids(:work_on) } } },
  2577. frontend: true
  2578. )
  2579. Setting.create_or_update(
  2580. title: __('Auto Assignment Ignored Users'),
  2581. name: 'ticket_auto_assignment_user_ids_ignore',
  2582. area: 'Web::Base',
  2583. description: __('Define an exception of "automatic assignment" for certain users (e.g. executives).'),
  2584. options: {
  2585. form: [
  2586. {},
  2587. ],
  2588. },
  2589. preferences: {
  2590. authentication: true,
  2591. permission: ['admin.ticket_auto_assignment'],
  2592. },
  2593. state: [],
  2594. frontend: true
  2595. )
  2596. Setting.create_or_update(
  2597. title: __('Default Ticket Agent Notifications'),
  2598. name: 'ticket_agent_default_notifications',
  2599. area: 'Ticket::Core',
  2600. description: __('Define the default agent notifications for new users.'),
  2601. options: {
  2602. form: [
  2603. {},
  2604. ],
  2605. },
  2606. preferences: {
  2607. authentication: true,
  2608. permission: ['admin.ticket'],
  2609. },
  2610. state: {
  2611. create: {
  2612. criteria: {
  2613. owned_by_me: true,
  2614. owned_by_nobody: true,
  2615. subscribed: true,
  2616. no: false,
  2617. },
  2618. channel: {
  2619. email: true,
  2620. online: true,
  2621. }
  2622. },
  2623. update: {
  2624. criteria: {
  2625. owned_by_me: true,
  2626. owned_by_nobody: true,
  2627. subscribed: true,
  2628. no: false,
  2629. },
  2630. channel: {
  2631. email: true,
  2632. online: true,
  2633. }
  2634. },
  2635. reminder_reached: {
  2636. criteria: {
  2637. owned_by_me: true,
  2638. owned_by_nobody: false,
  2639. subscribed: false,
  2640. no: false,
  2641. },
  2642. channel: {
  2643. email: true,
  2644. online: true,
  2645. }
  2646. },
  2647. escalation: {
  2648. criteria: {
  2649. owned_by_me: true,
  2650. owned_by_nobody: false,
  2651. subscribed: false,
  2652. no: false,
  2653. },
  2654. channel: {
  2655. email: true,
  2656. online: true,
  2657. }
  2658. }
  2659. },
  2660. frontend: true
  2661. )
  2662. Setting.create_if_not_exists(
  2663. title: __('Detect Duplicate Ticket Creation'),
  2664. name: 'ticket_duplicate_detection',
  2665. area: 'Web::TicketDuplicateDetection',
  2666. description: __('Enables a warning to users during ticket creation if there is an existing ticket with the same attributes.'),
  2667. options: {
  2668. form: [
  2669. {
  2670. display: '',
  2671. null: true,
  2672. name: 'ticket_duplicate_detection',
  2673. tag: 'boolean',
  2674. options: {
  2675. true => 'yes',
  2676. false => 'no',
  2677. },
  2678. },
  2679. ],
  2680. },
  2681. preferences: {
  2682. authentication: true,
  2683. permission: ['admin.ticket_duplicate_detection'],
  2684. },
  2685. state: false,
  2686. frontend: true
  2687. )
  2688. Setting.create_if_not_exists(
  2689. title: __('Attributes to compare'),
  2690. name: 'ticket_duplicate_detection_attributes',
  2691. area: 'Web::TicketDuplicateDetection',
  2692. description: __('Defines which ticket attributes are checked before creating a ticket.'),
  2693. options: {
  2694. form: [
  2695. {},
  2696. ],
  2697. },
  2698. preferences: {
  2699. authentication: true,
  2700. permission: ['admin.ticket_duplicate_detection'],
  2701. },
  2702. state: [],
  2703. frontend: true
  2704. )
  2705. Setting.create_if_not_exists(
  2706. title: __('Warning title'),
  2707. name: 'ticket_duplicate_detection_title',
  2708. area: 'Web::TicketDuplicateDetection',
  2709. description: __('Defines the warning title that is shown when a matching ticket is present.'),
  2710. options: {
  2711. form: [
  2712. {},
  2713. ],
  2714. },
  2715. preferences: {
  2716. authentication: true,
  2717. permission: ['admin.ticket_duplicate_detection'],
  2718. },
  2719. state: __('Similar tickets found'),
  2720. frontend: true
  2721. )
  2722. Setting.create_if_not_exists(
  2723. title: __('Warning message'),
  2724. name: 'ticket_duplicate_detection_body',
  2725. area: 'Web::TicketDuplicateDetection',
  2726. description: __('Defines the warning message that is shown when a matching ticket is present.'),
  2727. options: {
  2728. form: [
  2729. {},
  2730. ],
  2731. },
  2732. preferences: {
  2733. authentication: true,
  2734. permission: ['admin.ticket_duplicate_detection'],
  2735. },
  2736. state: __('Tickets with the same attributes were found.'),
  2737. frontend: true
  2738. )
  2739. Setting.create_if_not_exists(
  2740. title: __('Show to user roles'),
  2741. name: 'ticket_duplicate_detection_role_ids',
  2742. area: 'Web::TicketDuplicateDetection',
  2743. description: __('Defines which user roles will receive a warning in case of matching tickets.'),
  2744. options: {
  2745. form: [
  2746. {},
  2747. ],
  2748. },
  2749. preferences: {
  2750. authentication: true,
  2751. permission: ['admin.ticket_duplicate_detection'],
  2752. },
  2753. state: [2],
  2754. frontend: true
  2755. )
  2756. Setting.create_if_not_exists(
  2757. title: __('Show matching tickets in the warning'),
  2758. name: 'ticket_duplicate_detection_show_tickets',
  2759. area: 'Web::TicketDuplicateDetection',
  2760. description: __('Defines whether the matching tickets are shown in case of already existing tickets.'),
  2761. options: {
  2762. form: [
  2763. {},
  2764. ],
  2765. },
  2766. preferences: {
  2767. authentication: true,
  2768. permission: ['admin.ticket_duplicate_detection'],
  2769. },
  2770. state: true,
  2771. frontend: true
  2772. )
  2773. Setting.create_if_not_exists(
  2774. title: __('Permission level for looking up tickets'),
  2775. name: 'ticket_duplicate_detection_permission_level',
  2776. area: 'Web::TicketDuplicateDetection',
  2777. description: __('Defines the permission level used for lookups.'),
  2778. options: {
  2779. form: [
  2780. {},
  2781. ],
  2782. },
  2783. preferences: {
  2784. authentication: true,
  2785. permission: ['admin.ticket_duplicate_detection'],
  2786. },
  2787. state: 'user',
  2788. frontend: true
  2789. )
  2790. Setting.create_if_not_exists(
  2791. title: __('Match tickets in following states'),
  2792. name: 'ticket_duplicate_detection_search',
  2793. area: 'Web::TicketDuplicateDetection',
  2794. description: __('Defines the ticket states used for lookups.'),
  2795. options: {
  2796. form: [
  2797. {},
  2798. ],
  2799. },
  2800. state: 'all',
  2801. preferences: {
  2802. authentication: true,
  2803. permission: ['admin.ticket_duplicate_detection']
  2804. },
  2805. frontend: true
  2806. )
  2807. Setting.create_if_not_exists(
  2808. title: __('Ticket Number ignore system_id'),
  2809. name: 'ticket_number_ignore_system_id',
  2810. area: 'Ticket::Core',
  2811. description: '-',
  2812. options: {
  2813. form: [
  2814. {
  2815. display: __('Ignore system_id'),
  2816. null: true,
  2817. name: 'ticket_number_ignore_system_id',
  2818. tag: 'boolean',
  2819. options: {
  2820. true => 'yes',
  2821. false => 'no',
  2822. },
  2823. },
  2824. ],
  2825. },
  2826. state: false,
  2827. preferences: {
  2828. permission: ['admin.ticket'],
  2829. hidden: true,
  2830. },
  2831. frontend: false
  2832. )
  2833. Setting.create_if_not_exists(
  2834. title: __('Recursive Ticket Triggers'),
  2835. name: 'ticket_trigger_recursive',
  2836. area: 'Ticket::Core',
  2837. description: __('Activate the recursive processing of ticket triggers.'),
  2838. options: {
  2839. form: [
  2840. {
  2841. display: __('Recursive Ticket Triggers'),
  2842. null: true,
  2843. name: 'ticket_trigger_recursive',
  2844. tag: 'boolean',
  2845. options: {
  2846. true => 'yes',
  2847. false => 'no',
  2848. },
  2849. },
  2850. ],
  2851. },
  2852. state: false,
  2853. preferences: {
  2854. permission: ['admin.ticket'],
  2855. hidden: true,
  2856. },
  2857. frontend: false
  2858. )
  2859. Setting.create_if_not_exists(
  2860. title: __('Ticket Trigger Loop Protection Articles per Ticket'),
  2861. name: 'ticket_trigger_loop_protection_articles_per_ticket',
  2862. area: 'Ticket::Core',
  2863. description: __('Defines the configuration how many articles can be created in a minute range per ticket.'),
  2864. options: {},
  2865. state: {
  2866. 10 => 10,
  2867. 30 => 15,
  2868. 60 => 25,
  2869. 180 => 50,
  2870. 600 => 100,
  2871. },
  2872. preferences: {
  2873. permission: ['admin.ticket'],
  2874. hidden: true,
  2875. },
  2876. frontend: false
  2877. )
  2878. Setting.create_if_not_exists(
  2879. title: __('Ticket Trigger Loop Protection Articles Total'),
  2880. name: 'ticket_trigger_loop_protection_articles_total',
  2881. area: 'Ticket::Core',
  2882. description: __('Defines the configuration how many articles can be created in a minute range globally.'),
  2883. options: {},
  2884. state: {
  2885. 10 => 30,
  2886. 30 => 60,
  2887. 60 => 120,
  2888. 180 => 240,
  2889. 600 => 360,
  2890. },
  2891. preferences: {
  2892. permission: ['admin.ticket'],
  2893. hidden: true,
  2894. },
  2895. frontend: false
  2896. )
  2897. Setting.create_if_not_exists(
  2898. title: __('Maximum Recursive Ticket Triggers Depth'),
  2899. name: 'ticket_trigger_recursive_max_loop',
  2900. area: 'Ticket::Core',
  2901. description: __('Maximum number of recursively executed triggers.'),
  2902. options: {
  2903. form: [
  2904. {
  2905. display: __('Recursive Ticket Triggers'),
  2906. null: true,
  2907. name: 'ticket_trigger_recursive_max_loop',
  2908. tag: 'select',
  2909. options: {
  2910. 1 => ' 1',
  2911. 2 => ' 2',
  2912. 3 => ' 3',
  2913. 4 => ' 4',
  2914. 5 => ' 5',
  2915. 6 => ' 6',
  2916. 7 => ' 7',
  2917. 8 => ' 8',
  2918. 9 => ' 9',
  2919. 10 => '10',
  2920. 11 => '11',
  2921. 12 => '12',
  2922. 13 => '13',
  2923. 14 => '14',
  2924. 15 => '15',
  2925. 16 => '16',
  2926. 17 => '17',
  2927. 18 => '18',
  2928. 19 => '19',
  2929. 20 => '20',
  2930. },
  2931. },
  2932. ],
  2933. },
  2934. state: 10,
  2935. preferences: {
  2936. permission: ['admin.ticket'],
  2937. hidden: true,
  2938. },
  2939. frontend: false
  2940. )
  2941. Setting.create_if_not_exists(
  2942. title: __('Enable Ticket creation'),
  2943. name: 'customer_ticket_create',
  2944. area: 'CustomerWeb::Base',
  2945. description: __('Defines if a customer can create tickets via the web interface.'),
  2946. options: {
  2947. form: [
  2948. {
  2949. display: '',
  2950. null: true,
  2951. name: 'customer_ticket_create',
  2952. tag: 'boolean',
  2953. options: {
  2954. true => 'yes',
  2955. false => 'no',
  2956. },
  2957. },
  2958. ],
  2959. },
  2960. state: true,
  2961. preferences: {
  2962. authentication: true,
  2963. permission: ['admin.channel_web'],
  2964. },
  2965. frontend: true
  2966. )
  2967. Setting.create_if_not_exists(
  2968. title: __('Group selection for Ticket creation'),
  2969. name: 'customer_ticket_create_group_ids',
  2970. area: 'CustomerWeb::Base',
  2971. description: __('Defines groups for which a customer can create tickets via web interface. No selection means all groups are available.'),
  2972. options: {
  2973. form: [
  2974. {
  2975. display: '',
  2976. null: true,
  2977. name: 'group_ids',
  2978. tag: 'tree_select',
  2979. multiple: true,
  2980. relation: 'Group',
  2981. },
  2982. ],
  2983. },
  2984. state: nil,
  2985. preferences: {
  2986. authentication: true,
  2987. permission: ['admin.channel_web'],
  2988. },
  2989. frontend: true
  2990. )
  2991. Setting.create_if_not_exists(
  2992. title: __('Tab behaviour after ticket action'),
  2993. name: 'ticket_secondary_action',
  2994. area: 'CustomerWeb::Base',
  2995. description: __('Defines the tab behaviour after a ticket action.'),
  2996. options: {
  2997. form: [
  2998. {
  2999. display: '',
  3000. null: true,
  3001. name: 'ticket_secondary_action',
  3002. tag: 'boolean',
  3003. options: {
  3004. 'closeTab' => __('Close tab'),
  3005. 'closeTabOnTicketClose' => __('Close tab on ticket close'),
  3006. 'closeNextInOverview' => __('Next in overview'),
  3007. 'stayOnTab' => __('Stay on tab'),
  3008. },
  3009. },
  3010. ],
  3011. },
  3012. state: 'stayOnTab',
  3013. preferences: {
  3014. authentication: true,
  3015. permission: ['admin.channel_web'],
  3016. },
  3017. frontend: true
  3018. )
  3019. Setting.create_if_not_exists(
  3020. title: __('Enable Ticket creation'),
  3021. name: 'form_ticket_create',
  3022. area: 'Form::Base',
  3023. description: __('Defines if tickets can be created via web form.'),
  3024. options: {
  3025. form: [
  3026. {
  3027. display: '',
  3028. null: true,
  3029. name: 'form_ticket_create',
  3030. tag: 'boolean',
  3031. options: {
  3032. true => 'yes',
  3033. false => 'no',
  3034. },
  3035. },
  3036. ],
  3037. },
  3038. state: false,
  3039. preferences: {
  3040. permission: ['admin.channel_formular'],
  3041. },
  3042. frontend: false,
  3043. )
  3044. group = Group.where(active: true).first
  3045. if !group
  3046. group = Group.first
  3047. end
  3048. group_id = 1
  3049. if group
  3050. group_id = group.id
  3051. end
  3052. Setting.create_if_not_exists(
  3053. title: __('Group selection for ticket creation'),
  3054. name: 'form_ticket_create_group_id',
  3055. area: 'Form::Base',
  3056. description: __('Defines the group of tickets created via web form.'),
  3057. options: {
  3058. form: [
  3059. {
  3060. display: '',
  3061. null: true,
  3062. name: 'form_ticket_create_group_id',
  3063. tag: 'select',
  3064. relation: 'Group',
  3065. },
  3066. ],
  3067. },
  3068. state: group_id,
  3069. preferences: {
  3070. permission: ['admin.channel_formular'],
  3071. },
  3072. frontend: false,
  3073. )
  3074. Setting.create_if_not_exists(
  3075. title: __('Limit tickets by IP per hour'),
  3076. name: 'form_ticket_create_by_ip_per_hour',
  3077. area: 'Form::Base',
  3078. description: __('Defines a limit for how many tickets can be created via web form from one IP address per hour.'),
  3079. options: {
  3080. form: [
  3081. {
  3082. display: '',
  3083. null: true,
  3084. name: 'form_ticket_create_by_ip_per_hour',
  3085. tag: 'input',
  3086. },
  3087. ],
  3088. },
  3089. state: 20,
  3090. preferences: {
  3091. permission: ['admin.channel_formular'],
  3092. },
  3093. frontend: false,
  3094. )
  3095. Setting.create_if_not_exists(
  3096. title: __('Limit tickets by IP per day'),
  3097. name: 'form_ticket_create_by_ip_per_day',
  3098. area: 'Form::Base',
  3099. description: __('Defines a limit for how many tickets can be created via web form from one IP address per day.'),
  3100. options: {
  3101. form: [
  3102. {
  3103. display: '',
  3104. null: true,
  3105. name: 'form_ticket_create_by_ip_per_day',
  3106. tag: 'input',
  3107. },
  3108. ],
  3109. },
  3110. state: 240,
  3111. preferences: {
  3112. permission: ['admin.channel_formular'],
  3113. },
  3114. frontend: false,
  3115. )
  3116. Setting.create_if_not_exists(
  3117. title: __('Limit tickets per day'),
  3118. name: 'form_ticket_create_per_day',
  3119. area: 'Form::Base',
  3120. description: __('Defines a limit for how many tickets can be created via web form per day.'),
  3121. options: {
  3122. form: [
  3123. {
  3124. display: '',
  3125. null: true,
  3126. name: 'form_ticket_create_per_day',
  3127. tag: 'input',
  3128. },
  3129. ],
  3130. },
  3131. state: 5000,
  3132. preferences: {
  3133. permission: ['admin.channel_formular'],
  3134. },
  3135. frontend: false,
  3136. )
  3137. Setting.create_if_not_exists(
  3138. title: __('Ticket Subject Size'),
  3139. name: 'ticket_subject_size',
  3140. area: 'Email::Base',
  3141. description: __('Max. length of the subject in an email reply.'),
  3142. options: {
  3143. form: [
  3144. {
  3145. display: '',
  3146. null: false,
  3147. name: 'ticket_subject_size',
  3148. tag: 'input',
  3149. },
  3150. ],
  3151. },
  3152. state: '110',
  3153. preferences: {
  3154. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3155. },
  3156. frontend: false
  3157. )
  3158. Setting.create_if_not_exists(
  3159. title: __('Ticket Subject Reply'),
  3160. name: 'ticket_subject_re',
  3161. area: 'Email::Base',
  3162. description: __('The text at the beginning of the subject in an email reply, e.g. RE, AW, or AS.'),
  3163. options: {
  3164. form: [
  3165. {
  3166. display: '',
  3167. null: true,
  3168. name: 'ticket_subject_re',
  3169. tag: 'input',
  3170. },
  3171. ],
  3172. },
  3173. state: 'RE',
  3174. preferences: {
  3175. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3176. },
  3177. frontend: false
  3178. )
  3179. Setting.create_if_not_exists(
  3180. title: __('Ticket Subject Forward'),
  3181. name: 'ticket_subject_fwd',
  3182. area: 'Email::Base',
  3183. description: __('The text at the beginning of the subject in an email forward, e. g. FWD.'),
  3184. options: {
  3185. form: [
  3186. {
  3187. display: '',
  3188. null: true,
  3189. name: 'ticket_subject_fwd',
  3190. tag: 'input',
  3191. },
  3192. ],
  3193. },
  3194. state: 'FWD',
  3195. preferences: {
  3196. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3197. },
  3198. frontend: false
  3199. )
  3200. Setting.create_if_not_exists(
  3201. title: __('Sender Format'),
  3202. name: 'ticket_define_email_from',
  3203. area: 'Email::Base',
  3204. description: __('Defines how the From field of emails (sent from answers and email tickets) should look like.'),
  3205. options: {
  3206. form: [
  3207. {
  3208. display: '',
  3209. null: true,
  3210. name: 'ticket_define_email_from',
  3211. tag: 'select',
  3212. options: {
  3213. SystemAddressName: __('System Address Display Name'),
  3214. AgentNameSystemAddressName: __('Agent Name + FromSeparator + System Address Display Name'),
  3215. AgentName: __('Agent Name'),
  3216. },
  3217. translate: true,
  3218. },
  3219. ],
  3220. },
  3221. state: 'AgentNameSystemAddressName',
  3222. preferences: {
  3223. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3224. },
  3225. frontend: true
  3226. )
  3227. Setting.create_if_not_exists(
  3228. title: __('Sender Format Separator'),
  3229. name: 'ticket_define_email_from_separator',
  3230. area: 'Email::Base',
  3231. description: __('Defines the separator between the agent\'s real name and the given group email address.'),
  3232. options: {
  3233. form: [
  3234. {
  3235. display: '',
  3236. null: false,
  3237. name: 'ticket_define_email_from_separator',
  3238. tag: 'input',
  3239. },
  3240. ],
  3241. },
  3242. state: 'via',
  3243. preferences: {
  3244. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3245. },
  3246. frontend: true
  3247. )
  3248. Setting.create_if_not_exists(
  3249. title: __('Maximum Email Size'),
  3250. name: 'postmaster_max_size',
  3251. area: 'Email::Base',
  3252. description: __('Defines the maximum accepted email size in MB.'),
  3253. options: {
  3254. form: [
  3255. {
  3256. display: '',
  3257. null: true,
  3258. name: 'postmaster_max_size',
  3259. tag: 'select',
  3260. options: {
  3261. 1 => ' 1',
  3262. 2 => ' 2',
  3263. 3 => ' 3',
  3264. 4 => ' 4',
  3265. 5 => ' 5',
  3266. 6 => ' 6',
  3267. 7 => ' 7',
  3268. 8 => ' 8',
  3269. 9 => ' 9',
  3270. 10 => ' 10',
  3271. 15 => ' 15',
  3272. 20 => ' 20',
  3273. 25 => ' 25',
  3274. 30 => ' 30',
  3275. 35 => ' 35',
  3276. 40 => ' 40',
  3277. 45 => ' 45',
  3278. 50 => ' 50',
  3279. 60 => ' 60',
  3280. 70 => ' 70',
  3281. 80 => ' 80',
  3282. 90 => ' 90',
  3283. 100 => '100',
  3284. 125 => '125',
  3285. 150 => '150',
  3286. },
  3287. },
  3288. ],
  3289. },
  3290. state: 10,
  3291. preferences: {
  3292. online_service_disable: true,
  3293. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3294. },
  3295. frontend: false
  3296. )
  3297. Setting.create_if_not_exists(
  3298. title: __('Additional follow-up detection'),
  3299. name: 'postmaster_follow_up_search_in',
  3300. area: 'Email::Base',
  3301. 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.'),
  3302. options: {
  3303. form: [
  3304. {
  3305. display: '',
  3306. null: true,
  3307. name: 'postmaster_follow_up_search_in',
  3308. tag: 'checkbox',
  3309. options: {
  3310. 'references' => __('References - Search for follow-up also in In-Reply-To or References headers.'),
  3311. 'body' => __('Body - Search for follow-up also in mail body.'),
  3312. 'attachment' => __('Attachment - Search for follow-up also in attachments.'),
  3313. '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.'),
  3314. },
  3315. translate: true,
  3316. },
  3317. ],
  3318. },
  3319. state: ['subject_references'],
  3320. preferences: {
  3321. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3322. },
  3323. frontend: false
  3324. )
  3325. Setting.create_if_not_exists(
  3326. title: __('Sender based on Reply-To header'),
  3327. name: 'postmaster_sender_based_on_reply_to',
  3328. area: 'Email::Base',
  3329. 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.'),
  3330. options: {
  3331. form: [
  3332. {
  3333. display: '',
  3334. null: true,
  3335. name: 'postmaster_sender_based_on_reply_to',
  3336. tag: 'select',
  3337. options: {
  3338. '' => '-',
  3339. 'as_sender_of_email' => __('Take Reply-To header as sender/from of email.'),
  3340. 'as_sender_of_email_use_from_realname' => __('Take Reply-To header as sender/from of email and use the real name of origin from.'),
  3341. },
  3342. translate: true,
  3343. },
  3344. ],
  3345. },
  3346. state: [],
  3347. preferences: {
  3348. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3349. },
  3350. frontend: false
  3351. )
  3352. Setting.create_if_not_exists(
  3353. title: __('Customer selection based on sender and receiver list'),
  3354. name: 'postmaster_sender_is_agent_search_for_customer',
  3355. area: 'Email::Base',
  3356. description: __('If the sender is an agent, set the first user in the recipient list as the customer.'),
  3357. options: {
  3358. form: [
  3359. {
  3360. display: '',
  3361. null: true,
  3362. name: 'postmaster_sender_is_agent_search_for_customer',
  3363. tag: 'boolean',
  3364. options: {
  3365. true => 'yes',
  3366. false => 'no',
  3367. },
  3368. },
  3369. ],
  3370. },
  3371. state: true,
  3372. preferences: {
  3373. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3374. },
  3375. frontend: false
  3376. )
  3377. Setting.create_if_not_exists(
  3378. title: __('Send postmaster mail if mail too large'),
  3379. name: 'postmaster_send_reject_if_mail_too_large',
  3380. area: 'Email::Base',
  3381. description: __('Send postmaster reject mail to sender of mail if mail is too large.'),
  3382. options: {
  3383. form: [
  3384. {
  3385. display: '',
  3386. null: true,
  3387. name: 'postmaster_send_reject_if_mail_too_large',
  3388. tag: 'boolean',
  3389. options: {
  3390. true => 'yes',
  3391. false => 'no',
  3392. },
  3393. },
  3394. ],
  3395. },
  3396. state: true,
  3397. preferences: {
  3398. online_service_disable: true,
  3399. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3400. },
  3401. frontend: false
  3402. )
  3403. Setting.create_if_not_exists(
  3404. title: __('Notification Sender'),
  3405. name: 'notification_sender',
  3406. area: 'Email::Base',
  3407. description: __('Defines the sender of email notifications.'),
  3408. options: {
  3409. form: [
  3410. {
  3411. display: '',
  3412. null: false,
  3413. name: 'notification_sender',
  3414. tag: 'input',
  3415. },
  3416. ],
  3417. },
  3418. state: '#{config.product_name} <noreply@#{config.fqdn}>', # rubocop:disable Lint/InterpolationCheck
  3419. preferences: {
  3420. online_service_disable: true,
  3421. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3422. },
  3423. frontend: false
  3424. )
  3425. Setting.create_if_not_exists(
  3426. title: __('Block Notifications'),
  3427. name: 'send_no_auto_response_reg_exp',
  3428. area: 'Email::Base',
  3429. description: __('If this regex matches, no notification will be sent by the sender.'),
  3430. options: {
  3431. form: [
  3432. {
  3433. display: '',
  3434. null: false,
  3435. name: 'send_no_auto_response_reg_exp',
  3436. tag: 'input',
  3437. },
  3438. ],
  3439. },
  3440. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?',
  3441. preferences: {
  3442. online_service_disable: true,
  3443. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365', 'admin.channel_microsoft_graph'],
  3444. },
  3445. frontend: false
  3446. )
  3447. Setting.create_if_not_exists(
  3448. title: __('BCC address for all outgoing emails'),
  3449. name: 'system_bcc',
  3450. area: 'Email::Enhanced',
  3451. description: __('To archive all outgoing emails from Zammad to external, you can store a BCC email address here.'),
  3452. options: {},
  3453. state: '',
  3454. preferences: { online_service_disable: true },
  3455. frontend: false
  3456. )
  3457. Setting.create_if_not_exists(
  3458. title: __('API Token Access'),
  3459. name: 'api_token_access',
  3460. area: 'API::Base',
  3461. description: __('Enable REST API using tokens (not username/email address and password). Each user needs to create its own access tokens in user profile.'),
  3462. options: {
  3463. form: [
  3464. {
  3465. display: '',
  3466. null: true,
  3467. name: 'api_token_access',
  3468. tag: 'boolean',
  3469. options: {
  3470. true => 'yes',
  3471. false => 'no',
  3472. },
  3473. },
  3474. ],
  3475. },
  3476. state: true,
  3477. preferences: {
  3478. permission: ['admin.api'],
  3479. },
  3480. frontend: true
  3481. )
  3482. Setting.create_if_not_exists(
  3483. title: __('API Password Access'),
  3484. name: 'api_password_access',
  3485. area: 'API::Base',
  3486. description: __('Enable REST API access using the username/email address and password for the authentication user.'),
  3487. options: {
  3488. form: [
  3489. {
  3490. display: '',
  3491. null: true,
  3492. name: 'api_password_access',
  3493. tag: 'boolean',
  3494. options: {
  3495. true => 'yes',
  3496. false => 'no',
  3497. },
  3498. },
  3499. ],
  3500. },
  3501. state: true,
  3502. preferences: {
  3503. permission: ['admin.api'],
  3504. },
  3505. frontend: true
  3506. )
  3507. Setting.create_if_not_exists(
  3508. title: __('Monitoring Token'),
  3509. name: 'monitoring_token',
  3510. area: 'HealthCheck::Base',
  3511. description: __('Token for monitoring.'),
  3512. options: {
  3513. form: [
  3514. {
  3515. display: '',
  3516. null: false,
  3517. name: 'monitoring_token',
  3518. tag: 'input',
  3519. },
  3520. ],
  3521. },
  3522. state: ENV['MONITORING_TOKEN'] || SecureRandom.urlsafe_base64(40),
  3523. preferences: {
  3524. permission: ['admin.monitoring'],
  3525. },
  3526. frontend: false
  3527. )
  3528. Setting.create_if_not_exists(
  3529. title: __('Enable Chat'),
  3530. name: 'chat',
  3531. area: 'Chat::Base',
  3532. description: __('Enable/disable online chat.'),
  3533. options: {
  3534. form: [
  3535. {
  3536. display: '',
  3537. null: true,
  3538. name: 'chat',
  3539. tag: 'boolean',
  3540. options: {
  3541. true => 'yes',
  3542. false => 'no',
  3543. },
  3544. },
  3545. ],
  3546. },
  3547. preferences: {
  3548. trigger: ['menu:render', 'chat:rerender'],
  3549. permission: ['admin.channel_chat'],
  3550. },
  3551. state: false,
  3552. frontend: true
  3553. )
  3554. Setting.create_if_not_exists(
  3555. title: __('Agent idle timeout'),
  3556. name: 'chat_agent_idle_timeout',
  3557. area: 'Chat::Extended',
  3558. description: __('Idle timeout in seconds until agent is set offline automatically.'),
  3559. options: {
  3560. form: [
  3561. {
  3562. display: '',
  3563. null: false,
  3564. name: 'chat_agent_idle_timeout',
  3565. tag: 'input',
  3566. },
  3567. ],
  3568. },
  3569. state: '120',
  3570. preferences: {
  3571. permission: ['admin.channel_chat'],
  3572. },
  3573. frontend: true
  3574. )
  3575. Setting.create_if_not_exists(
  3576. title: __('Default Screen'),
  3577. name: 'default_controller',
  3578. area: 'Core',
  3579. description: __('Defines the default screen.'),
  3580. options: {},
  3581. state: '#dashboard',
  3582. frontend: true
  3583. )
  3584. Setting.create_if_not_exists(
  3585. title: __('Elasticsearch Endpoint URL'),
  3586. name: 'es_url',
  3587. area: 'SearchIndex::Elasticsearch',
  3588. description: __('Defines endpoint of Elasticsearch.'),
  3589. state: '',
  3590. preferences: { online_service_disable: true },
  3591. frontend: false
  3592. )
  3593. Setting.create_if_not_exists(
  3594. title: __('Elasticsearch Endpoint User'),
  3595. name: 'es_user',
  3596. area: 'SearchIndex::Elasticsearch',
  3597. description: __('Defines HTTP basic auth user of Elasticsearch.'),
  3598. state: '',
  3599. preferences: { online_service_disable: true },
  3600. frontend: false
  3601. )
  3602. Setting.create_if_not_exists(
  3603. title: __('Elasticsearch Endpoint Password'),
  3604. name: 'es_password',
  3605. area: 'SearchIndex::Elasticsearch',
  3606. description: __('Defines HTTP basic auth password of Elasticsearch.'),
  3607. state: '',
  3608. preferences: { online_service_disable: true },
  3609. frontend: false
  3610. )
  3611. Setting.create_if_not_exists(
  3612. title: __('Elasticsearch Endpoint Index'),
  3613. name: 'es_index',
  3614. area: 'SearchIndex::Elasticsearch',
  3615. description: __('Defines Elasticsearch index name.'),
  3616. state: 'zammad',
  3617. preferences: { online_service_disable: true },
  3618. frontend: false
  3619. )
  3620. Setting.create_if_not_exists(
  3621. title: __('Elasticsearch SSL verification'),
  3622. name: 'es_ssl_verify',
  3623. area: 'SearchIndex::Elasticsearch',
  3624. description: __('Defines Elasticsearch SSL verification.'),
  3625. state: true,
  3626. preferences: { online_service_disable: true },
  3627. frontend: false
  3628. )
  3629. Setting.create_if_not_exists(
  3630. title: __('Elasticsearch Attachment Extensions'),
  3631. name: 'es_attachment_ignore',
  3632. area: 'SearchIndex::Elasticsearch',
  3633. description: __('Defines attachment extensions which will be ignored by Elasticsearch.'),
  3634. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  3635. preferences: { online_service_disable: true },
  3636. frontend: false
  3637. )
  3638. Setting.create_if_not_exists(
  3639. title: __('Elasticsearch Attachment Size'),
  3640. name: 'es_attachment_max_size_in_mb',
  3641. area: 'SearchIndex::Elasticsearch',
  3642. description: __('Define max. attachment size for Elasticsearch.'),
  3643. state: 10,
  3644. preferences: { online_service_disable: true },
  3645. frontend: false
  3646. )
  3647. Setting.create_if_not_exists(
  3648. title: __('Elasticsearch Total Payload Size'),
  3649. name: 'es_total_max_size_in_mb',
  3650. area: 'SearchIndex::Elasticsearch',
  3651. description: __('Define max. payload size for Elasticsearch.'),
  3652. state: 300,
  3653. preferences: { online_service_disable: true },
  3654. frontend: false
  3655. )
  3656. Setting.create_if_not_exists(
  3657. title: __('Elasticsearch Pipeline Name'),
  3658. name: 'es_pipeline',
  3659. area: 'SearchIndex::Elasticsearch',
  3660. description: __('Define pipeline name for Elasticsearch.'),
  3661. state: '',
  3662. preferences: { online_service_disable: true },
  3663. frontend: false
  3664. )
  3665. Setting.create_if_not_exists(
  3666. title: __('Elasticsearch Model Configuration'),
  3667. name: 'es_model_settings',
  3668. area: 'SearchIndex::Elasticsearch',
  3669. description: __('Define model configuration for Elasticsearch.'),
  3670. state: {},
  3671. preferences: { online_service_disable: true },
  3672. frontend: false
  3673. )
  3674. Setting.create_if_not_exists(
  3675. title: __('Import Mode'),
  3676. name: 'import_mode',
  3677. area: 'Import::Base',
  3678. description: __('Puts Zammad into import mode (disables some triggers).'),
  3679. options: {
  3680. form: [
  3681. {
  3682. display: '',
  3683. null: true,
  3684. name: 'import_mode',
  3685. tag: 'boolean',
  3686. options: {
  3687. true => 'yes',
  3688. false => 'no',
  3689. },
  3690. },
  3691. ],
  3692. },
  3693. state: false,
  3694. frontend: true
  3695. )
  3696. Setting.create_if_not_exists(
  3697. title: __('Import Backend'),
  3698. name: 'import_backend',
  3699. area: 'Import::Base::Internal',
  3700. description: __('Set backend which is being used for import.'),
  3701. options: {},
  3702. state: '',
  3703. frontend: true
  3704. )
  3705. Setting.create_if_not_exists(
  3706. title: __('Ignore Escalation/SLA Information'),
  3707. name: 'import_ignore_sla',
  3708. area: 'Import::Base',
  3709. description: __('Ignore escalation/SLA information for import.'),
  3710. options: {
  3711. form: [
  3712. {
  3713. display: '',
  3714. null: true,
  3715. name: 'import_ignore_sla',
  3716. tag: 'boolean',
  3717. options: {
  3718. true => 'yes',
  3719. false => 'no',
  3720. },
  3721. },
  3722. ],
  3723. },
  3724. state: false,
  3725. frontend: false
  3726. )
  3727. Setting.create_if_not_exists(
  3728. title: __('Import Endpoint'),
  3729. name: 'import_otrs_endpoint',
  3730. area: 'Import::OTRS',
  3731. description: __('Defines an OTRS endpoint to import users, tickets, states, and articles.'),
  3732. options: {
  3733. form: [
  3734. {
  3735. display: '',
  3736. null: false,
  3737. name: 'import_otrs_endpoint',
  3738. tag: 'input',
  3739. },
  3740. ],
  3741. },
  3742. state: 'http://otrs_host/otrs',
  3743. frontend: false
  3744. )
  3745. Setting.create_if_not_exists(
  3746. title: __('Import Key'),
  3747. name: 'import_otrs_endpoint_key',
  3748. area: 'Import::OTRS',
  3749. description: __('Defines OTRS endpoint authentication key.'),
  3750. options: {
  3751. form: [
  3752. {
  3753. display: '',
  3754. null: false,
  3755. name: 'import_otrs_endpoint_key',
  3756. tag: 'input',
  3757. },
  3758. ],
  3759. },
  3760. state: '',
  3761. frontend: false
  3762. )
  3763. Setting.create_if_not_exists(
  3764. title: __('Import User for HTTP basic authentication'),
  3765. name: 'import_otrs_user',
  3766. area: 'Import::OTRS',
  3767. description: __('Defines HTTP basic authentication user (only if OTRS is protected via HTTP basic auth).'),
  3768. options: {
  3769. form: [
  3770. {
  3771. display: '',
  3772. null: true,
  3773. name: 'import_otrs_user',
  3774. tag: 'input',
  3775. },
  3776. ],
  3777. },
  3778. state: '',
  3779. frontend: false
  3780. )
  3781. Setting.create_if_not_exists(
  3782. title: __('Import Password for HTTP basic authentication'),
  3783. name: 'import_otrs_password',
  3784. area: 'Import::OTRS',
  3785. description: __('Defines HTTP basic authentication password (only if OTRS is protected via HTTP basic auth).'),
  3786. options: {
  3787. form: [
  3788. {
  3789. display: '',
  3790. null: true,
  3791. name: 'import_otrs_password',
  3792. tag: 'input',
  3793. },
  3794. ],
  3795. },
  3796. state: '',
  3797. frontend: false
  3798. )
  3799. Setting.create_if_not_exists(
  3800. title: __('Import Endpoint'),
  3801. name: 'import_zendesk_endpoint',
  3802. area: 'Import::Zendesk',
  3803. description: __('Defines a Zendesk endpoint to import users, tickets, states, and articles.'),
  3804. options: {
  3805. form: [
  3806. {
  3807. display: '',
  3808. null: false,
  3809. name: 'import_zendesk_endpoint',
  3810. tag: 'input',
  3811. },
  3812. ],
  3813. },
  3814. state: 'https://yours.zendesk.com/api/v2',
  3815. frontend: false
  3816. )
  3817. Setting.create_if_not_exists(
  3818. title: __('Import API key for requesting the Zendesk API'),
  3819. name: 'import_zendesk_endpoint_key',
  3820. area: 'Import::Zendesk',
  3821. description: __('Defines Zendesk endpoint authentication API key.'),
  3822. options: {
  3823. form: [
  3824. {
  3825. display: '',
  3826. null: false,
  3827. name: 'import_zendesk_endpoint_key',
  3828. tag: 'input',
  3829. },
  3830. ],
  3831. },
  3832. state: '',
  3833. frontend: false
  3834. )
  3835. Setting.create_if_not_exists(
  3836. title: __('Import User for requesting the Zendesk API'),
  3837. name: 'import_zendesk_endpoint_username',
  3838. area: 'Import::Zendesk',
  3839. description: __('Defines Zendesk endpoint authentication user.'),
  3840. options: {
  3841. form: [
  3842. {
  3843. display: '',
  3844. null: true,
  3845. name: 'import_zendesk_endpoint_username',
  3846. tag: 'input',
  3847. },
  3848. ],
  3849. },
  3850. state: '',
  3851. frontend: false
  3852. )
  3853. Setting.create_if_not_exists(
  3854. title: __('Import Endpoint'),
  3855. name: 'import_freshdesk_endpoint',
  3856. area: 'Import::Freshdesk',
  3857. description: __('Defines a Freshdesk endpoint to import users, tickets, states, and articles.'),
  3858. options: {
  3859. form: [
  3860. {
  3861. display: '',
  3862. null: false,
  3863. name: 'import_freshdesk_endpoint',
  3864. tag: 'input',
  3865. },
  3866. ],
  3867. },
  3868. state: 'https://yours.freshdesk.com/api/v2',
  3869. frontend: false
  3870. )
  3871. Setting.create_if_not_exists(
  3872. title: __('Import API key for requesting the Freshdesk API'),
  3873. name: 'import_freshdesk_endpoint_key',
  3874. area: 'Import::Freshdesk',
  3875. description: __('Defines Freshdesk endpoint authentication API key.'),
  3876. options: {
  3877. form: [
  3878. {
  3879. display: '',
  3880. null: false,
  3881. name: 'import_freshdesk_endpoint_key',
  3882. tag: 'input',
  3883. },
  3884. ],
  3885. },
  3886. state: '',
  3887. frontend: false
  3888. )
  3889. Setting.create_if_not_exists(
  3890. title: __('Import Endpoint'),
  3891. name: 'import_kayako_endpoint',
  3892. area: 'Import::Kayako',
  3893. description: __('Defines a Kayako endpoint to import users, tickets, states, and articles.'),
  3894. options: {
  3895. form: [
  3896. {
  3897. display: '',
  3898. null: false,
  3899. name: 'import_kayako_endpoint',
  3900. tag: 'input',
  3901. },
  3902. ],
  3903. },
  3904. state: 'https://yours.kayako.com/api/v1',
  3905. frontend: false
  3906. )
  3907. Setting.create_if_not_exists(
  3908. title: __('Import User for requesting the Kayako API'),
  3909. name: 'import_kayako_endpoint_username',
  3910. area: 'Import::Kayako',
  3911. description: __('Defines Kayako endpoint authentication user.'),
  3912. options: {
  3913. form: [
  3914. {
  3915. display: '',
  3916. null: false,
  3917. name: 'import_kayako_endpoint_username',
  3918. tag: 'input',
  3919. },
  3920. ],
  3921. },
  3922. state: '',
  3923. frontend: false
  3924. )
  3925. Setting.create_if_not_exists(
  3926. title: __('Import Password for requesting the Kayako API'),
  3927. name: 'import_kayako_endpoint_password',
  3928. area: 'Import::Kayako',
  3929. description: __('Defines Kayako endpoint authentication password.'),
  3930. options: {
  3931. form: [
  3932. {
  3933. display: '',
  3934. null: false,
  3935. name: 'import_kayako_endpoint_password',
  3936. tag: 'input',
  3937. },
  3938. ],
  3939. },
  3940. state: '',
  3941. frontend: false
  3942. )
  3943. Setting.create_if_not_exists(
  3944. title: __('Import Backends'),
  3945. name: 'import_backends',
  3946. area: 'Import',
  3947. description: __('A list of active import backends that gets scheduled automatically.'),
  3948. options: {},
  3949. state: ['Import::Ldap', 'Import::Exchange'],
  3950. preferences: {
  3951. permission: ['admin'],
  3952. },
  3953. frontend: false
  3954. )
  3955. Setting.create_if_not_exists(
  3956. title: __('Sequencer log level'),
  3957. name: 'sequencer_log_level',
  3958. area: 'Core',
  3959. description: __('Defines the log levels for various logging actions of the Sequencer.'),
  3960. options: {},
  3961. state: {
  3962. sequence: {
  3963. start_finish: :debug,
  3964. unit: :debug,
  3965. result: :debug,
  3966. },
  3967. state: {
  3968. optional: :debug,
  3969. set: :debug,
  3970. get: :debug,
  3971. attribute_initialization: {
  3972. start_finish: :debug,
  3973. attributes: :debug,
  3974. },
  3975. parameter_initialization: {
  3976. parameters: :debug,
  3977. start_finish: :debug,
  3978. unused: :debug,
  3979. },
  3980. expectations_initialization: :debug,
  3981. cleanup: {
  3982. start_finish: :debug,
  3983. remove: :debug,
  3984. }
  3985. }
  3986. },
  3987. frontend: false,
  3988. )
  3989. Setting.create_if_not_exists(
  3990. title: __('Time Accounting'),
  3991. name: 'time_accounting',
  3992. area: 'Web::Base',
  3993. description: __('Enable time accounting.'),
  3994. options: {
  3995. form: [
  3996. {
  3997. display: '',
  3998. null: true,
  3999. name: 'time_accounting',
  4000. tag: 'boolean',
  4001. options: {
  4002. true => 'yes',
  4003. false => 'no',
  4004. },
  4005. },
  4006. ],
  4007. },
  4008. preferences: {
  4009. authentication: true,
  4010. permission: ['admin.time_accounting'],
  4011. },
  4012. state: false,
  4013. frontend: true
  4014. )
  4015. Setting.create_if_not_exists(
  4016. title: __('Time Accounting Selector'),
  4017. name: 'time_accounting_selector',
  4018. area: 'Web::Base',
  4019. description: __('Show time accounting dialog when updating matching tickets.'),
  4020. options: {
  4021. form: [
  4022. {},
  4023. ],
  4024. },
  4025. preferences: {
  4026. authentication: true,
  4027. permission: ['admin.time_accounting'],
  4028. },
  4029. state: {},
  4030. frontend: true
  4031. )
  4032. Setting.create_if_not_exists(
  4033. title: __('Time Accounting Unit'),
  4034. name: 'time_accounting_unit',
  4035. area: 'Web::Base',
  4036. description: __('Defines the unit to be shown next to the time accounting input field.'),
  4037. options: {
  4038. form: [
  4039. {},
  4040. ],
  4041. },
  4042. preferences: {
  4043. authentication: true,
  4044. permission: ['admin.time_accounting'],
  4045. },
  4046. state: '',
  4047. frontend: true
  4048. )
  4049. Setting.create_if_not_exists(
  4050. title: __('Time Accounting Custom Unit'),
  4051. name: 'time_accounting_unit_custom',
  4052. area: 'Web::Base',
  4053. description: __('Defines the custom unit to be shown next to the time accounting input field.'),
  4054. options: {
  4055. form: [
  4056. {},
  4057. ],
  4058. },
  4059. preferences: {
  4060. authentication: true,
  4061. permission: ['admin.time_accounting'],
  4062. },
  4063. state: '',
  4064. frontend: true
  4065. )
  4066. Setting.create_if_not_exists(
  4067. title: __('Time Accounting Types'),
  4068. name: 'time_accounting_types',
  4069. area: 'Web::Base',
  4070. description: __('Defines if the time accounting types are enabled.'),
  4071. options: {
  4072. form: [
  4073. {},
  4074. ],
  4075. },
  4076. preferences: {
  4077. authentication: true,
  4078. permission: ['admin.time_accounting'],
  4079. },
  4080. state: false,
  4081. frontend: true
  4082. )
  4083. Setting.create_if_not_exists(
  4084. title: __('Time Accounting Default Type'),
  4085. name: 'time_accounting_type_default',
  4086. area: 'Web::Base',
  4087. description: __('Defines the default time accounting type.'),
  4088. options: {
  4089. form: [
  4090. {},
  4091. ],
  4092. },
  4093. preferences: {
  4094. authentication: true,
  4095. permission: ['admin.time_accounting'],
  4096. },
  4097. state: '',
  4098. frontend: true
  4099. )
  4100. Setting.create_if_not_exists(
  4101. title: __('New Tags'),
  4102. name: 'tag_new',
  4103. area: 'Web::Base',
  4104. description: __('Allow users to create new tags.'),
  4105. options: {
  4106. form: [
  4107. {
  4108. display: '',
  4109. null: true,
  4110. name: 'tag_new',
  4111. tag: 'boolean',
  4112. options: {
  4113. true => 'yes',
  4114. false => 'no',
  4115. },
  4116. },
  4117. ],
  4118. },
  4119. preferences: {
  4120. authentication: true,
  4121. permission: ['admin.tag'],
  4122. },
  4123. state: true,
  4124. frontend: true
  4125. )
  4126. Setting.create_if_not_exists(
  4127. title: __('Default calendar tickets subscriptions'),
  4128. name: 'defaults_calendar_subscriptions_tickets',
  4129. area: 'Defaults::CalendarSubscriptions',
  4130. description: __('Defines the default calendar tickets subscription settings.'),
  4131. options: {},
  4132. state: {
  4133. escalation: {
  4134. own: true,
  4135. not_assigned: false,
  4136. },
  4137. new_open: {
  4138. own: true,
  4139. not_assigned: false,
  4140. },
  4141. pending: {
  4142. own: true,
  4143. not_assigned: false,
  4144. }
  4145. },
  4146. preferences: {
  4147. authentication: true,
  4148. },
  4149. frontend: true
  4150. )
  4151. Setting.create_if_not_exists(
  4152. title: __('Defines postmaster filter.'),
  4153. name: '0005_postmaster_filter_trusted',
  4154. area: 'Postmaster::PreFilter',
  4155. description: __('Defines postmaster filter to remove X-Zammad headers from untrustworthy sources.'),
  4156. options: {},
  4157. state: 'Channel::Filter::Trusted',
  4158. frontend: false
  4159. )
  4160. Setting.create_if_not_exists(
  4161. title: __('Defines postmaster filter.'),
  4162. name: '0006_postmaster_filter_auto_response_check',
  4163. area: 'Postmaster::PreFilter',
  4164. description: __('Defines postmaster filter to identify auto responses to prevent auto replies from Zammad.'),
  4165. options: {},
  4166. state: 'Channel::Filter::AutoResponseCheck',
  4167. frontend: false
  4168. )
  4169. Setting.create_if_not_exists(
  4170. title: __('Defines postmaster filter.'),
  4171. name: '0007_postmaster_filter_follow_up_check',
  4172. area: 'Postmaster::PreFilter',
  4173. description: __('Defines postmaster filter to identify follow-ups (based on admin settings).'),
  4174. options: {},
  4175. state: 'Channel::Filter::FollowUpCheck',
  4176. frontend: false
  4177. )
  4178. Setting.create_if_not_exists(
  4179. title: __('Defines postmaster filter.'),
  4180. name: '0008_postmaster_filter_follow_up_merged',
  4181. area: 'Postmaster::PreFilter',
  4182. description: __('Defines postmaster filter to identify follow-up ticket for merged tickets.'),
  4183. options: {},
  4184. state: 'Channel::Filter::FollowUpMerged',
  4185. frontend: false
  4186. )
  4187. Setting.create_if_not_exists(
  4188. title: __('Defines postmaster filter.'),
  4189. name: '0009_postmaster_filter_follow_up_assignment',
  4190. area: 'Postmaster::PreFilter',
  4191. description: __('Defines postmaster filter to set the owner (based on group follow up assignment).'),
  4192. options: {},
  4193. state: 'Channel::Filter::FollowUpAssignment',
  4194. frontend: false
  4195. )
  4196. Setting.create_if_not_exists(
  4197. title: __('Defines postmaster filter.'),
  4198. name: '0011_postmaster_sender_based_on_reply_to',
  4199. area: 'Postmaster::PreFilter',
  4200. description: __('Defines postmaster filter to set the sender/from of emails based on reply-to header.'),
  4201. options: {},
  4202. state: 'Channel::Filter::ReplyToBasedSender',
  4203. frontend: false
  4204. )
  4205. Setting.create_if_not_exists(
  4206. title: __('Define postmaster filter.'),
  4207. name: '0018_postmaster_import_archive',
  4208. area: 'Postmaster::PreFilter',
  4209. description: __('Define postmaster filter to import archive mailboxes.'),
  4210. options: {},
  4211. state: 'Channel::Filter::ImportArchive',
  4212. frontend: false
  4213. )
  4214. Setting.create_if_not_exists(
  4215. title: __('Defines postmaster filter.'),
  4216. name: '0012_postmaster_filter_sender_is_system_address',
  4217. area: 'Postmaster::PreFilter',
  4218. description: __('Defines postmaster filter to check if email has been created by Zammad itself and will set the article sender.'),
  4219. options: {},
  4220. state: 'Channel::Filter::SenderIsSystemAddress',
  4221. frontend: false
  4222. )
  4223. Setting.create_if_not_exists(
  4224. title: __('Defines postmaster filter.'),
  4225. name: '0014_postmaster_filter_own_notification_loop_detection',
  4226. area: 'Postmaster::PreFilter',
  4227. description: __('Defines postmaster filter to check if the email is a self-created notification email, then ignore it to prevent email loops.'),
  4228. options: {},
  4229. state: 'Channel::Filter::OwnNotificationLoopDetection',
  4230. frontend: false
  4231. )
  4232. Setting.create_if_not_exists(
  4233. title: __('Defines postmaster filter.'),
  4234. name: '0015_postmaster_filter_identify_sender',
  4235. area: 'Postmaster::PreFilter',
  4236. description: __('Defines postmaster filter to identify sender user.'),
  4237. options: {},
  4238. state: 'Channel::Filter::IdentifySender',
  4239. frontend: false
  4240. )
  4241. Setting.create_if_not_exists(
  4242. title: __('Defines postmaster filter.'),
  4243. name: '0016_postmaster_filter_secure_mailing',
  4244. area: 'Postmaster::PreFilter',
  4245. description: __('Defines postmaster filter to handle secure mailing.'),
  4246. options: {},
  4247. state: 'Channel::Filter::SecureMailing',
  4248. frontend: false
  4249. )
  4250. Setting.create_if_not_exists(
  4251. title: __('Defines postmaster filter.'),
  4252. name: '0030_postmaster_filter_out_of_office_check',
  4253. area: 'Postmaster::PreFilter',
  4254. description: __('Defines postmaster filter to identify out-of-office emails for follow-up detection and keeping current ticket state.'),
  4255. options: {},
  4256. state: 'Channel::Filter::OutOfOfficeCheck',
  4257. frontend: false
  4258. )
  4259. Setting.create_if_not_exists(
  4260. title: __('Defines postmaster filter.'),
  4261. name: '0200_postmaster_filter_follow_up_possible_check',
  4262. area: 'Postmaster::PreFilter',
  4263. description: __('Define postmaster filter to check if follow-ups get created (based on admin settings).'),
  4264. options: {},
  4265. state: 'Channel::Filter::FollowUpPossibleCheck',
  4266. frontend: false
  4267. )
  4268. Setting.create_if_not_exists(
  4269. title: __('Defines postmaster filter.'),
  4270. name: '0900_postmaster_filter_bounce_follow_up_check',
  4271. area: 'Postmaster::PreFilter',
  4272. description: __('Defines postmaster filter to identify postmaster bounces; and handles them as follow-up of the original tickets'),
  4273. options: {},
  4274. state: 'Channel::Filter::BounceFollowUpCheck',
  4275. frontend: false
  4276. )
  4277. Setting.create_if_not_exists(
  4278. title: __('Defines postmaster filter.'),
  4279. name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
  4280. area: 'Postmaster::PreFilter',
  4281. description: __('Defines postmaster filter to identify postmaster bounces; and disables sending notification if delivery fails permanently.'),
  4282. options: {},
  4283. state: 'Channel::Filter::BounceDeliveryPermanentFailed',
  4284. frontend: false
  4285. )
  4286. Setting.create_if_not_exists(
  4287. title: __('Defines postmaster filter.'),
  4288. name: '0955_postmaster_filter_bounce_delivery_temporary_failed',
  4289. area: 'Postmaster::PreFilter',
  4290. description: __('Defines postmaster filter to identify postmaster bounces; and reopens tickets if delivery fails permanently.'),
  4291. options: {},
  4292. state: 'Channel::Filter::BounceDeliveryTemporaryFailed',
  4293. frontend: false
  4294. )
  4295. Setting.create_if_not_exists(
  4296. title: __('Defines postmaster filter.'),
  4297. name: '1000_postmaster_filter_database_check',
  4298. area: 'Postmaster::PreFilter',
  4299. description: __('Defines postmaster filter for filters managed via admin interface.'),
  4300. options: {},
  4301. state: 'Channel::Filter::Database',
  4302. frontend: false
  4303. )
  4304. Setting.create_if_not_exists(
  4305. title: __('Defines postmaster filter.'),
  4306. name: '5000_postmaster_filter_icinga',
  4307. area: 'Postmaster::PreFilter',
  4308. description: __('Defines postmaster filter to manage Icinga (http://www.icinga.org) emails.'),
  4309. options: {},
  4310. state: 'Channel::Filter::Icinga',
  4311. frontend: false
  4312. )
  4313. Setting.create_if_not_exists(
  4314. title: __('Defines postmaster filter.'),
  4315. name: '5100_postmaster_filter_nagios',
  4316. area: 'Postmaster::PreFilter',
  4317. description: __('Defines postmaster filter to manage Nagios (http://www.nagios.org) emails.'),
  4318. options: {},
  4319. state: 'Channel::Filter::Nagios',
  4320. frontend: false
  4321. )
  4322. Setting.create_if_not_exists(
  4323. title: __('Defines postmaster filter.'),
  4324. name: '5300_postmaster_filter_monit',
  4325. area: 'Postmaster::PreFilter',
  4326. description: __('Defines postmaster filter to manage Monit (https://mmonit.com/monit/) emails.'),
  4327. options: {},
  4328. state: 'Channel::Filter::Monit',
  4329. frontend: false
  4330. )
  4331. Setting.create_if_not_exists(
  4332. title: __('Defines postmaster filter.'),
  4333. name: '5400_postmaster_filter_service_now_check',
  4334. area: 'Postmaster::PreFilter',
  4335. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  4336. options: {},
  4337. state: 'Channel::Filter::ServiceNowCheck',
  4338. frontend: false
  4339. )
  4340. Setting.create_if_not_exists(
  4341. title: __('Defines postmaster filter.'),
  4342. name: '5401_postmaster_filter_service_now_check',
  4343. area: 'Postmaster::PostFilter',
  4344. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  4345. options: {},
  4346. state: 'Channel::Filter::ServiceNowCheck',
  4347. frontend: false
  4348. )
  4349. Setting.create_if_not_exists(
  4350. title: __('Defines postmaster filter.'),
  4351. name: '5400_postmaster_filter_jira_check',
  4352. area: 'Postmaster::PreFilter',
  4353. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  4354. options: {},
  4355. state: 'Channel::Filter::JiraCheck',
  4356. frontend: false
  4357. )
  4358. Setting.create_if_not_exists(
  4359. title: __('Defines postmaster filter.'),
  4360. name: '5401_postmaster_filter_jira_check',
  4361. area: 'Postmaster::PostFilter',
  4362. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  4363. options: {},
  4364. state: 'Channel::Filter::JiraCheck',
  4365. frontend: false
  4366. )
  4367. Setting.create_if_not_exists(
  4368. title: __('Define postmaster filter.'),
  4369. name: '5500_postmaster_internal_article_check',
  4370. area: 'Postmaster::PreFilter',
  4371. 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.'),
  4372. options: {},
  4373. state: 'Channel::Filter::InternalArticleCheck',
  4374. frontend: false
  4375. )
  4376. Setting.create_if_not_exists(
  4377. title: __('Icinga integration'),
  4378. name: 'icinga_integration',
  4379. area: 'Integration::Switch',
  4380. description: __('Defines if Icinga (http://www.icinga.org) is enabled or not.'),
  4381. options: {
  4382. form: [
  4383. {
  4384. display: '',
  4385. null: true,
  4386. name: 'icinga_integration',
  4387. tag: 'boolean',
  4388. options: {
  4389. true => 'yes',
  4390. false => 'no',
  4391. },
  4392. },
  4393. ],
  4394. },
  4395. state: false,
  4396. preferences: {
  4397. prio: 1,
  4398. permission: ['admin.integration'],
  4399. },
  4400. frontend: false
  4401. )
  4402. Setting.create_if_not_exists(
  4403. title: __('Sender'),
  4404. name: 'icinga_sender',
  4405. area: 'Integration::Icinga',
  4406. description: __('Defines the sender email address of Icinga emails.'),
  4407. options: {
  4408. form: [
  4409. {
  4410. display: '',
  4411. null: false,
  4412. name: 'icinga_sender',
  4413. tag: 'input',
  4414. placeholder: 'icinga@monitoring.example.com',
  4415. },
  4416. ],
  4417. },
  4418. state: 'icinga@monitoring.example.com',
  4419. preferences: {
  4420. prio: 2,
  4421. permission: ['admin.integration'],
  4422. },
  4423. frontend: false,
  4424. )
  4425. Setting.create_if_not_exists(
  4426. title: __('Auto close'),
  4427. name: 'icinga_auto_close',
  4428. area: 'Integration::Icinga',
  4429. description: __('Defines if tickets should be closed if service is recovered.'),
  4430. options: {
  4431. form: [
  4432. {
  4433. display: '',
  4434. null: true,
  4435. name: 'icinga_auto_close',
  4436. tag: 'boolean',
  4437. options: {
  4438. true => 'yes',
  4439. false => 'no',
  4440. },
  4441. },
  4442. ],
  4443. },
  4444. state: true,
  4445. preferences: {
  4446. prio: 3,
  4447. permission: ['admin.integration'],
  4448. },
  4449. frontend: false
  4450. )
  4451. Setting.create_if_not_exists(
  4452. title: __('Auto-close state'),
  4453. name: 'icinga_auto_close_state_id',
  4454. area: 'Integration::Icinga',
  4455. description: __('Defines the state of auto-closed tickets.'),
  4456. options: {
  4457. form: [
  4458. {
  4459. display: '',
  4460. null: false,
  4461. name: 'icinga_auto_close_state_id',
  4462. tag: 'select',
  4463. relation: 'TicketState',
  4464. },
  4465. ],
  4466. },
  4467. state: 4,
  4468. preferences: {
  4469. prio: 4,
  4470. permission: ['admin.integration'],
  4471. },
  4472. frontend: false
  4473. )
  4474. Setting.create_if_not_exists(
  4475. title: __('Nagios integration'),
  4476. name: 'nagios_integration',
  4477. area: 'Integration::Switch',
  4478. description: __('Defines if Nagios (http://www.nagios.org) is enabled or not.'),
  4479. options: {
  4480. form: [
  4481. {
  4482. display: '',
  4483. null: true,
  4484. name: 'nagios_integration',
  4485. tag: 'boolean',
  4486. options: {
  4487. true => 'yes',
  4488. false => 'no',
  4489. },
  4490. },
  4491. ],
  4492. },
  4493. state: false,
  4494. preferences: {
  4495. prio: 1,
  4496. permission: ['admin.integration'],
  4497. },
  4498. frontend: false
  4499. )
  4500. Setting.create_if_not_exists(
  4501. title: __('Sender'),
  4502. name: 'nagios_sender',
  4503. area: 'Integration::Nagios',
  4504. description: __('Defines the sender email address of Nagios emails.'),
  4505. options: {
  4506. form: [
  4507. {
  4508. display: '',
  4509. null: false,
  4510. name: 'nagios_sender',
  4511. tag: 'input',
  4512. placeholder: 'nagios@monitoring.example.com',
  4513. },
  4514. ],
  4515. },
  4516. state: 'nagios@monitoring.example.com',
  4517. preferences: {
  4518. prio: 2,
  4519. permission: ['admin.integration'],
  4520. },
  4521. frontend: false,
  4522. )
  4523. Setting.create_if_not_exists(
  4524. title: __('Auto close'),
  4525. name: 'nagios_auto_close',
  4526. area: 'Integration::Nagios',
  4527. description: __('Defines if tickets should be closed if service is recovered.'),
  4528. options: {
  4529. form: [
  4530. {
  4531. display: '',
  4532. null: true,
  4533. name: 'nagios_auto_close',
  4534. tag: 'boolean',
  4535. options: {
  4536. true => 'yes',
  4537. false => 'no',
  4538. },
  4539. },
  4540. ],
  4541. },
  4542. state: true,
  4543. preferences: {
  4544. prio: 3,
  4545. permission: ['admin.integration'],
  4546. },
  4547. frontend: false
  4548. )
  4549. Setting.create_if_not_exists(
  4550. title: __('Auto-close state'),
  4551. name: 'nagios_auto_close_state_id',
  4552. area: 'Integration::Nagios',
  4553. description: __('Defines the state of auto-closed tickets.'),
  4554. options: {
  4555. form: [
  4556. {
  4557. display: '',
  4558. null: false,
  4559. name: 'nagios_auto_close_state_id',
  4560. tag: 'select',
  4561. relation: 'TicketState',
  4562. },
  4563. ],
  4564. },
  4565. state: 4,
  4566. preferences: {
  4567. prio: 4,
  4568. permission: ['admin.integration'],
  4569. },
  4570. frontend: false
  4571. )
  4572. Setting.create_if_not_exists(
  4573. title: __('Checkmk integration'),
  4574. name: 'check_mk_integration',
  4575. area: 'Integration::Switch',
  4576. description: __('Defines if Checkmk (https://checkmk.com/) is enabled or not.'),
  4577. options: {
  4578. form: [
  4579. {
  4580. display: '',
  4581. null: true,
  4582. name: 'check_mk_integration',
  4583. tag: 'boolean',
  4584. options: {
  4585. true => 'yes',
  4586. false => 'no',
  4587. },
  4588. },
  4589. ],
  4590. },
  4591. state: false,
  4592. preferences: {
  4593. prio: 1,
  4594. permission: ['admin.integration'],
  4595. },
  4596. frontend: false
  4597. )
  4598. Setting.create_if_not_exists(
  4599. title: __('Group'),
  4600. name: 'check_mk_group_id',
  4601. area: 'Integration::CheckMK',
  4602. description: __('Defines the group of created tickets.'),
  4603. options: {
  4604. form: [
  4605. {
  4606. display: '',
  4607. null: false,
  4608. name: 'check_mk_group_id',
  4609. tag: 'select',
  4610. relation: 'Group',
  4611. },
  4612. ],
  4613. },
  4614. state: 1,
  4615. preferences: {
  4616. prio: 2,
  4617. permission: ['admin.integration'],
  4618. },
  4619. frontend: false
  4620. )
  4621. Setting.create_if_not_exists(
  4622. title: __('Auto close'),
  4623. name: 'check_mk_auto_close',
  4624. area: 'Integration::CheckMK',
  4625. description: __('Defines if tickets should be closed if service is recovered.'),
  4626. options: {
  4627. form: [
  4628. {
  4629. display: '',
  4630. null: true,
  4631. name: 'check_mk_auto_close',
  4632. tag: 'boolean',
  4633. options: {
  4634. true => 'yes',
  4635. false => 'no',
  4636. },
  4637. },
  4638. ],
  4639. },
  4640. state: true,
  4641. preferences: {
  4642. prio: 3,
  4643. permission: ['admin.integration'],
  4644. },
  4645. frontend: false
  4646. )
  4647. Setting.create_if_not_exists(
  4648. title: __('Auto-close state'),
  4649. name: 'check_mk_auto_close_state_id',
  4650. area: 'Integration::CheckMK',
  4651. description: __('Defines the state of auto-closed tickets.'),
  4652. options: {
  4653. form: [
  4654. {
  4655. display: '',
  4656. null: false,
  4657. name: 'check_mk_auto_close_state_id',
  4658. tag: 'select',
  4659. relation: 'TicketState',
  4660. },
  4661. ],
  4662. },
  4663. state: 4,
  4664. preferences: {
  4665. prio: 4,
  4666. permission: ['admin.integration'],
  4667. },
  4668. frontend: false
  4669. )
  4670. Setting.create_if_not_exists(
  4671. title: __('Checkmk token'),
  4672. name: 'check_mk_token',
  4673. area: 'Core',
  4674. description: __('Defines the Checkmk token for allowing updates.'),
  4675. options: {},
  4676. state: ENV['CHECK_MK_TOKEN'] || SecureRandom.hex(16),
  4677. preferences: {
  4678. permission: ['admin.integration'],
  4679. },
  4680. frontend: false
  4681. )
  4682. Setting.create_if_not_exists(
  4683. title: __('Monit integration'),
  4684. name: 'monit_integration',
  4685. area: 'Integration::Switch',
  4686. description: __('Defines if Monit (https://mmonit.com/monit/) is enabled or not.'),
  4687. options: {
  4688. form: [
  4689. {
  4690. display: '',
  4691. null: true,
  4692. name: 'monit_integration',
  4693. tag: 'boolean',
  4694. options: {
  4695. true => 'yes',
  4696. false => 'no',
  4697. },
  4698. },
  4699. ],
  4700. },
  4701. state: false,
  4702. preferences: {
  4703. prio: 1,
  4704. permission: ['admin.integration'],
  4705. },
  4706. frontend: false
  4707. )
  4708. Setting.create_if_not_exists(
  4709. title: __('Sender'),
  4710. name: 'monit_sender',
  4711. area: 'Integration::Monit',
  4712. description: __('Defines the sender email address of the service emails.'),
  4713. options: {
  4714. form: [
  4715. {
  4716. display: '',
  4717. null: false,
  4718. name: 'monit_sender',
  4719. tag: 'input',
  4720. placeholder: 'monit@monitoring.example.com',
  4721. },
  4722. ],
  4723. },
  4724. state: 'monit@monitoring.example.com',
  4725. preferences: {
  4726. prio: 2,
  4727. permission: ['admin.integration'],
  4728. },
  4729. frontend: false,
  4730. )
  4731. Setting.create_if_not_exists(
  4732. title: __('Auto close'),
  4733. name: 'monit_auto_close',
  4734. area: 'Integration::Monit',
  4735. description: __('Defines if tickets should be closed if service is recovered.'),
  4736. options: {
  4737. form: [
  4738. {
  4739. display: '',
  4740. null: true,
  4741. name: 'monit_auto_close',
  4742. tag: 'boolean',
  4743. options: {
  4744. true => 'yes',
  4745. false => 'no',
  4746. },
  4747. translate: true,
  4748. },
  4749. ],
  4750. },
  4751. state: true,
  4752. preferences: {
  4753. prio: 3,
  4754. permission: ['admin.integration'],
  4755. },
  4756. frontend: false
  4757. )
  4758. Setting.create_if_not_exists(
  4759. title: __('Auto-close state'),
  4760. name: 'monit_auto_close_state_id',
  4761. area: 'Integration::Monit',
  4762. description: __('Defines the state of auto-closed tickets.'),
  4763. options: {
  4764. form: [
  4765. {
  4766. display: '',
  4767. null: false,
  4768. name: 'monit_auto_close_state_id',
  4769. tag: 'select',
  4770. relation: 'TicketState',
  4771. translate: true,
  4772. },
  4773. ],
  4774. },
  4775. state: 4,
  4776. preferences: {
  4777. prio: 4,
  4778. permission: ['admin.integration'],
  4779. },
  4780. frontend: false
  4781. )
  4782. Setting.create_if_not_exists(
  4783. title: __('LDAP integration'),
  4784. name: 'ldap_integration',
  4785. area: 'Integration::Switch',
  4786. description: __('Defines if LDAP is enabled or not.'),
  4787. options: {
  4788. form: [
  4789. {
  4790. display: '',
  4791. null: true,
  4792. name: 'ldap_integration',
  4793. tag: 'boolean',
  4794. options: {
  4795. true => 'yes',
  4796. false => 'no',
  4797. },
  4798. },
  4799. ],
  4800. },
  4801. state: false,
  4802. preferences: {
  4803. prio: 1,
  4804. authentication: true,
  4805. permission: ['admin.integration'],
  4806. },
  4807. frontend: true
  4808. )
  4809. Setting.create_if_not_exists(
  4810. title: __('Exchange config'),
  4811. name: 'exchange_config',
  4812. area: 'Integration::Exchange',
  4813. description: __('Defines the Exchange config.'),
  4814. options: {},
  4815. state: {},
  4816. preferences: {
  4817. prio: 2,
  4818. permission: ['admin.integration'],
  4819. },
  4820. frontend: false,
  4821. )
  4822. Setting.create_if_not_exists(
  4823. title: __('Exchange OAuth'),
  4824. name: 'exchange_oauth',
  4825. area: 'Integration::Exchange',
  4826. description: __('Defines the Exchange OAuth config.'),
  4827. options: {},
  4828. state: {},
  4829. preferences: {
  4830. prio: 2,
  4831. permission: ['admin.integration'],
  4832. },
  4833. frontend: false,
  4834. )
  4835. Setting.create_if_not_exists(
  4836. title: __('Exchange integration'),
  4837. name: 'exchange_integration',
  4838. area: 'Integration::Switch',
  4839. description: __('Defines if Exchange is enabled or not.'),
  4840. options: {
  4841. form: [
  4842. {
  4843. display: '',
  4844. null: true,
  4845. name: 'exchange_integration',
  4846. tag: 'boolean',
  4847. options: {
  4848. true => 'yes',
  4849. false => 'no',
  4850. },
  4851. },
  4852. ],
  4853. },
  4854. state: false,
  4855. preferences: {
  4856. prio: 1,
  4857. authentication: true,
  4858. permission: ['admin.integration'],
  4859. },
  4860. frontend: true
  4861. )
  4862. Setting.create_if_not_exists(
  4863. title: __('i-doit integration'),
  4864. name: 'idoit_integration',
  4865. area: 'Integration::Switch',
  4866. description: __('Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not.'),
  4867. options: {
  4868. form: [
  4869. {
  4870. display: '',
  4871. null: true,
  4872. name: 'idoit_integration',
  4873. tag: 'boolean',
  4874. options: {
  4875. true => 'yes',
  4876. false => 'no',
  4877. },
  4878. },
  4879. ],
  4880. },
  4881. state: false,
  4882. preferences: {
  4883. prio: 1,
  4884. authentication: true,
  4885. permission: ['admin.integration'],
  4886. },
  4887. frontend: true
  4888. )
  4889. Setting.create_if_not_exists(
  4890. title: __('i-doit config'),
  4891. name: 'idoit_config',
  4892. area: 'Integration::Idoit',
  4893. description: __('Defines the i-doit config.'),
  4894. options: {},
  4895. state: {},
  4896. preferences: {
  4897. prio: 2,
  4898. permission: ['admin.integration'],
  4899. },
  4900. frontend: false,
  4901. )
  4902. Setting.create_if_not_exists(
  4903. title: __('GitLab integration'),
  4904. name: 'gitlab_integration',
  4905. area: 'Integration::Switch',
  4906. description: __('Defines if the GitLab (http://www.gitlab.com) integration is enabled or not.'),
  4907. options: {
  4908. form: [
  4909. {
  4910. display: '',
  4911. null: true,
  4912. name: 'gitlab_integration',
  4913. tag: 'boolean',
  4914. options: {
  4915. true => 'yes',
  4916. false => 'no',
  4917. },
  4918. },
  4919. ],
  4920. },
  4921. state: false,
  4922. preferences: {
  4923. prio: 1,
  4924. authentication: true,
  4925. permission: ['admin.integration'],
  4926. },
  4927. frontend: true
  4928. )
  4929. Setting.create_if_not_exists(
  4930. title: __('GitLab config'),
  4931. name: 'gitlab_config',
  4932. area: 'Integration::GitLab',
  4933. description: __('Stores the GitLab configuration.'),
  4934. options: {},
  4935. state: {
  4936. endpoint: 'https://gitlab.com/api/graphql',
  4937. },
  4938. preferences: {
  4939. prio: 2,
  4940. permission: ['admin.integration'],
  4941. },
  4942. frontend: false,
  4943. )
  4944. Setting.create_if_not_exists(
  4945. title: __('GitHub integration'),
  4946. name: 'github_integration',
  4947. area: 'Integration::Switch',
  4948. description: __('Defines if the GitHub (http://www.github.com) integration is enabled or not.'),
  4949. options: {
  4950. form: [
  4951. {
  4952. display: '',
  4953. null: true,
  4954. name: 'github_integration',
  4955. tag: 'boolean',
  4956. options: {
  4957. true => 'yes',
  4958. false => 'no',
  4959. },
  4960. },
  4961. ],
  4962. },
  4963. state: false,
  4964. preferences: {
  4965. prio: 1,
  4966. authentication: true,
  4967. permission: ['admin.integration'],
  4968. },
  4969. frontend: true
  4970. )
  4971. Setting.create_if_not_exists(
  4972. title: __('GitHub config'),
  4973. name: 'github_config',
  4974. area: 'Integration::GitHub',
  4975. description: __('Stores the GitHub configuration.'),
  4976. options: {},
  4977. state: {
  4978. endpoint: 'https://api.github.com/graphql',
  4979. },
  4980. preferences: {
  4981. prio: 2,
  4982. permission: ['admin.integration'],
  4983. },
  4984. frontend: false,
  4985. )
  4986. Setting.create_if_not_exists(
  4987. title: __('Defines sync transaction backend.'),
  4988. name: '0100_trigger',
  4989. area: 'Transaction::Backend::Sync',
  4990. description: __('Defines the transaction backend to execute triggers.'),
  4991. options: {},
  4992. state: 'Transaction::Trigger',
  4993. frontend: false
  4994. )
  4995. Setting.create_if_not_exists(
  4996. title: __('Defines transaction backend.'),
  4997. name: '0100_notification',
  4998. area: 'Transaction::Backend::Async',
  4999. description: __('Defines the transaction backend to send agent notifications.'),
  5000. options: {},
  5001. state: 'Transaction::Notification',
  5002. frontend: false
  5003. )
  5004. Setting.create_if_not_exists(
  5005. title: __('Defines transaction backend.'),
  5006. name: '1000_signature_detection',
  5007. area: 'Transaction::Backend::Async',
  5008. description: __('Defines the transaction backend to detect customer signatures in emails.'),
  5009. options: {},
  5010. state: 'Transaction::SignatureDetection',
  5011. frontend: false
  5012. )
  5013. Setting.create_if_not_exists(
  5014. title: __('Defines transaction backend.'),
  5015. name: '6000_slack_webhook',
  5016. area: 'Transaction::Backend::Async',
  5017. description: __('Defines the transaction backend which posts messages to Slack (http://www.slack.com).'),
  5018. options: {},
  5019. state: 'Transaction::Slack',
  5020. frontend: false
  5021. )
  5022. Setting.create_if_not_exists(
  5023. title: __('Slack integration'),
  5024. name: 'slack_integration',
  5025. area: 'Integration::Switch',
  5026. description: __('Defines if Slack (http://www.slack.org) is enabled or not.'),
  5027. options: {
  5028. form: [
  5029. {
  5030. display: '',
  5031. null: true,
  5032. name: 'slack_integration',
  5033. tag: 'boolean',
  5034. options: {
  5035. true => 'yes',
  5036. false => 'no',
  5037. },
  5038. },
  5039. ],
  5040. },
  5041. state: false,
  5042. preferences: {
  5043. prio: 1,
  5044. permission: ['admin.integration'],
  5045. },
  5046. frontend: false
  5047. )
  5048. Setting.create_if_not_exists(
  5049. title: __('Slack config'),
  5050. name: 'slack_config',
  5051. area: 'Integration::Slack',
  5052. description: __('Defines the Slack config.'),
  5053. options: {},
  5054. state: {
  5055. items: []
  5056. },
  5057. preferences: {
  5058. prio: 2,
  5059. permission: ['admin.integration'],
  5060. },
  5061. frontend: false,
  5062. )
  5063. Setting.create_if_not_exists(
  5064. title: __('sipgate.io integration'),
  5065. name: 'sipgate_integration',
  5066. area: 'Integration::Switch',
  5067. description: __('Defines if sipgate.io (http://www.sipgate.io) is enabled or not.'),
  5068. options: {
  5069. form: [
  5070. {
  5071. display: '',
  5072. null: true,
  5073. name: 'sipgate_integration',
  5074. tag: 'boolean',
  5075. options: {
  5076. true => 'yes',
  5077. false => 'no',
  5078. },
  5079. },
  5080. ],
  5081. },
  5082. state: false,
  5083. preferences: {
  5084. prio: 1,
  5085. trigger: ['menu:render', 'cti:reload'],
  5086. authentication: true,
  5087. permission: ['admin.integration'],
  5088. },
  5089. frontend: true
  5090. )
  5091. Setting.create_if_not_exists(
  5092. title: __('sipgate.io Token'),
  5093. name: 'sipgate_token',
  5094. area: 'Integration::Sipgate',
  5095. description: __('Token for Sipgate.'),
  5096. options: {
  5097. form: [
  5098. {
  5099. display: '',
  5100. null: false,
  5101. name: 'sipgate_token',
  5102. tag: 'input',
  5103. },
  5104. ],
  5105. },
  5106. state: ENV['SIPGATE_TOKEN'] || SecureRandom.urlsafe_base64(20),
  5107. preferences: {
  5108. permission: ['admin.integration'],
  5109. },
  5110. frontend: false
  5111. )
  5112. Setting.create_if_not_exists(
  5113. title: __('sipgate.io config'),
  5114. name: 'sipgate_config',
  5115. area: 'Integration::Sipgate',
  5116. description: __('Defines the sipgate.io config.'),
  5117. options: {},
  5118. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  5119. preferences: {
  5120. prio: 2,
  5121. permission: ['admin.integration'],
  5122. },
  5123. frontend: false,
  5124. )
  5125. Setting.create_if_not_exists(
  5126. title: __('sipgate.io alternative FQDN'),
  5127. name: 'sipgate_alternative_fqdn',
  5128. area: 'Integration::Sipgate::Expert',
  5129. description: __('Alternative FQDN for callbacks if you operate Zammad in an internal network.'),
  5130. options: {
  5131. form: [
  5132. {
  5133. display: '',
  5134. null: false,
  5135. name: 'sipgate_alternative_fqdn',
  5136. tag: 'input',
  5137. },
  5138. ],
  5139. },
  5140. state: '',
  5141. preferences: {
  5142. permission: ['admin.integration'],
  5143. },
  5144. frontend: false
  5145. )
  5146. Setting.create_if_not_exists(
  5147. title: __('CTI integration'),
  5148. name: 'cti_integration',
  5149. area: 'Integration::Switch',
  5150. description: __('Defines if generic CTI integration is enabled or not.'),
  5151. options: {
  5152. form: [
  5153. {
  5154. display: '',
  5155. null: true,
  5156. name: 'cti_integration',
  5157. tag: 'boolean',
  5158. options: {
  5159. true => 'yes',
  5160. false => 'no',
  5161. },
  5162. },
  5163. ],
  5164. },
  5165. state: false,
  5166. preferences: {
  5167. prio: 1,
  5168. trigger: ['menu:render', 'cti:reload'],
  5169. authentication: true,
  5170. permission: ['admin.integration'],
  5171. },
  5172. frontend: true
  5173. )
  5174. Setting.create_if_not_exists(
  5175. title: __('CTI config'),
  5176. name: 'cti_config',
  5177. area: 'Integration::Cti',
  5178. description: __('Defines the CTI config.'),
  5179. options: {},
  5180. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  5181. preferences: {
  5182. prio: 2,
  5183. permission: ['admin.integration'],
  5184. },
  5185. frontend: false,
  5186. )
  5187. Setting.create_if_not_exists(
  5188. title: __('CTI Token'),
  5189. name: 'cti_token',
  5190. area: 'Integration::Cti',
  5191. description: __('Token for CTI.'),
  5192. options: {
  5193. form: [
  5194. {
  5195. display: '',
  5196. null: false,
  5197. name: 'cti_token',
  5198. tag: 'input',
  5199. },
  5200. ],
  5201. },
  5202. state: ENV['CTI_TOKEN'] || SecureRandom.urlsafe_base64(20),
  5203. preferences: {
  5204. permission: ['admin.integration'],
  5205. },
  5206. frontend: false
  5207. )
  5208. Setting.create_if_not_exists(
  5209. title: __('CTI customer last activity'),
  5210. name: 'cti_customer_last_activity',
  5211. area: 'Integration::Cti',
  5212. description: __('Defines the duration of customer activity (in seconds) on a call until the user profile dialog is shown.'),
  5213. options: {},
  5214. state: 30.days,
  5215. preferences: {
  5216. prio: 2,
  5217. permission: ['admin.integration'],
  5218. },
  5219. frontend: false,
  5220. )
  5221. Setting.create_if_not_exists(
  5222. title: __('Placetel integration'),
  5223. name: 'placetel_integration',
  5224. area: 'Integration::Switch',
  5225. description: __('Defines if Placetel (http://www.placetel.de) is enabled or not.'),
  5226. options: {
  5227. form: [
  5228. {
  5229. display: '',
  5230. null: true,
  5231. name: 'placetel_integration',
  5232. tag: 'boolean',
  5233. options: {
  5234. true => 'yes',
  5235. false => 'no',
  5236. },
  5237. },
  5238. ],
  5239. },
  5240. state: false,
  5241. preferences: {
  5242. prio: 1,
  5243. trigger: ['menu:render', 'cti:reload'],
  5244. authentication: true,
  5245. permission: ['admin.integration'],
  5246. },
  5247. frontend: true
  5248. )
  5249. Setting.create_if_not_exists(
  5250. title: __('Placetel config'),
  5251. name: 'placetel_config',
  5252. area: 'Integration::Placetel',
  5253. description: __('Defines the Placetel config.'),
  5254. options: {},
  5255. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  5256. preferences: {
  5257. prio: 2,
  5258. permission: ['admin.integration'],
  5259. cache: ['placetelGetVoipUsers'],
  5260. },
  5261. frontend: false,
  5262. )
  5263. Setting.create_if_not_exists(
  5264. title: __('Placetel Token'),
  5265. name: 'placetel_token',
  5266. area: 'Integration::Placetel',
  5267. description: __('Defines the token for Placetel.'),
  5268. options: {
  5269. form: [
  5270. {
  5271. display: '',
  5272. null: false,
  5273. name: 'placetel_token',
  5274. tag: 'input',
  5275. },
  5276. ],
  5277. },
  5278. state: ENV['PLACETEL_TOKEN'] || SecureRandom.urlsafe_base64(20),
  5279. preferences: {
  5280. permission: ['admin.integration'],
  5281. },
  5282. frontend: false
  5283. )
  5284. Setting.create_if_not_exists(
  5285. title: __('Clearbit integration'),
  5286. name: 'clearbit_integration',
  5287. area: 'Integration::Switch',
  5288. description: __('Defines if Clearbit (http://www.clearbit.com) is enabled or not.'),
  5289. options: {
  5290. form: [
  5291. {
  5292. display: '',
  5293. null: true,
  5294. name: 'clearbit_integration',
  5295. tag: 'boolean',
  5296. options: {
  5297. true => 'yes',
  5298. false => 'no',
  5299. },
  5300. },
  5301. ],
  5302. },
  5303. state: false,
  5304. preferences: {
  5305. prio: 1,
  5306. permission: ['admin.integration'],
  5307. },
  5308. frontend: false
  5309. )
  5310. Setting.create_if_not_exists(
  5311. title: __('Clearbit config'),
  5312. name: 'clearbit_config',
  5313. area: 'Integration::Clearbit',
  5314. description: __('Defines the Clearbit config.'),
  5315. options: {},
  5316. state: {},
  5317. frontend: false,
  5318. preferences: {
  5319. prio: 2,
  5320. permission: ['admin.integration'],
  5321. },
  5322. )
  5323. Setting.create_if_not_exists(
  5324. title: __('Defines transaction backend.'),
  5325. name: '9000_clearbit_enrichment',
  5326. area: 'Transaction::Backend::Async',
  5327. description: __('Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com).'),
  5328. options: {},
  5329. state: 'Transaction::ClearbitEnrichment',
  5330. frontend: false
  5331. )
  5332. Setting.create_if_not_exists(
  5333. title: __('Defines transaction backend.'),
  5334. name: '9100_cti_caller_id_detection',
  5335. area: 'Transaction::Backend::Async',
  5336. description: __('Defines the transaction backend which detects caller IDs in objects and stores them for CTI lookups.'),
  5337. options: {},
  5338. state: 'Transaction::CtiCallerIdDetection',
  5339. frontend: false
  5340. )
  5341. Setting.create_if_not_exists(
  5342. title: __('Defines transaction backend.'),
  5343. name: '9200_time_based_trigger',
  5344. area: 'Transaction::Backend::Async',
  5345. description: __('Defines the transaction backend which executes time based triggers.'),
  5346. options: {},
  5347. state: 'Transaction::TimeBasedTrigger',
  5348. frontend: false
  5349. )
  5350. Setting.create_if_not_exists(
  5351. title: __('Set agent limit'),
  5352. name: 'system_agent_limit',
  5353. area: 'Core::Online',
  5354. description: __('Defines the agent limit.'),
  5355. options: {},
  5356. state: false,
  5357. preferences: { online_service_disable: true },
  5358. frontend: false
  5359. )
  5360. Setting.create_if_not_exists(
  5361. title: __('HTML Email CSS Font'),
  5362. name: 'html_email_css_font',
  5363. area: 'Core',
  5364. description: __('Defines the CSS font information for HTML emails.'),
  5365. options: {},
  5366. state: "font-family:'Helvetica Neue', Helvetica, Arial, Geneva, sans-serif; font-size: 12px;",
  5367. preferences: {
  5368. permission: ['admin'],
  5369. },
  5370. frontend: false
  5371. )
  5372. Setting.create_if_not_exists(
  5373. title: __('HTML Sanitizer Processing Timeout'),
  5374. name: 'html_sanitizer_processing_timeout',
  5375. area: 'Core',
  5376. description: __('Defines processing timeout for the html sanitizer.'),
  5377. options: {},
  5378. state: 20,
  5379. preferences: {},
  5380. frontend: false
  5381. )
  5382. # add the dashboard stats backend for 'Stats::TicketWaitingTime'
  5383. Setting.create_if_not_exists(
  5384. title: __('Stats Backend'),
  5385. name: 'Stats::TicketWaitingTime',
  5386. area: 'Dashboard::Stats',
  5387. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5388. options: {},
  5389. state: 'Stats::TicketWaitingTime',
  5390. preferences: {
  5391. permission: ['ticket.agent'],
  5392. prio: 1,
  5393. },
  5394. frontend: false
  5395. )
  5396. # add the dashboard stats backend for 'Stats::TicketEscalation'
  5397. Setting.create_if_not_exists(
  5398. title: __('Stats Backend'),
  5399. name: 'Stats::TicketEscalation',
  5400. area: 'Dashboard::Stats',
  5401. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5402. options: {},
  5403. state: 'Stats::TicketEscalation',
  5404. preferences: {
  5405. permission: ['ticket.agent'],
  5406. prio: 2,
  5407. },
  5408. frontend: false
  5409. )
  5410. # add the dashboard stats backend for 'Stats::TicketChannelDistribution'
  5411. Setting.create_if_not_exists(
  5412. title: __('Stats Backend'),
  5413. name: 'Stats::TicketChannelDistribution',
  5414. area: 'Dashboard::Stats',
  5415. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5416. options: {},
  5417. state: 'Stats::TicketChannelDistribution',
  5418. preferences: {
  5419. permission: ['ticket.agent'],
  5420. prio: 3,
  5421. },
  5422. frontend: false
  5423. )
  5424. # add the dashboard stats backend for 'Stats::TicketLoadMeasure'
  5425. Setting.create_if_not_exists(
  5426. title: __('Stats Backend'),
  5427. name: 'Stats::TicketLoadMeasure',
  5428. area: 'Dashboard::Stats',
  5429. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5430. options: {},
  5431. state: 'Stats::TicketLoadMeasure',
  5432. preferences: {
  5433. permission: ['ticket.agent'],
  5434. prio: 4,
  5435. },
  5436. frontend: false
  5437. )
  5438. # add the dashboard stats backend for 'Stats::TicketInProcess'
  5439. Setting.create_if_not_exists(
  5440. title: __('Stats Backend'),
  5441. name: 'Stats::TicketInProcess',
  5442. area: 'Dashboard::Stats',
  5443. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5444. options: {},
  5445. state: 'Stats::TicketInProcess',
  5446. preferences: {
  5447. permission: ['ticket.agent'],
  5448. prio: 5,
  5449. },
  5450. frontend: false
  5451. )
  5452. # add the dashboard stats backend for 'Stats::TicketReopen'
  5453. Setting.create_if_not_exists(
  5454. title: __('Stats Backend'),
  5455. name: 'Stats::TicketReopen',
  5456. area: 'Dashboard::Stats',
  5457. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  5458. options: {},
  5459. state: 'Stats::TicketReopen',
  5460. preferences: {
  5461. permission: ['ticket.agent'],
  5462. prio: 6,
  5463. },
  5464. frontend: false
  5465. )
  5466. Setting.create_if_not_exists(
  5467. title: __('Knowledge Base multilingual support'),
  5468. name: 'kb_multi_lingual_support',
  5469. area: 'Kb::Core',
  5470. description: __('Support of multilingual Knowledge Base.'),
  5471. options: {},
  5472. state: true,
  5473. preferences: { online_service_disable: true },
  5474. frontend: true
  5475. )
  5476. Setting.create_if_not_exists(
  5477. title: __('Knowledge Base active'),
  5478. name: 'kb_active',
  5479. area: 'Kb::Core',
  5480. description: __('Defines if Knowledge Base navbar button is enabled.'),
  5481. state: true,
  5482. preferences: {
  5483. prio: 1,
  5484. trigger: ['menu:render'],
  5485. authentication: true,
  5486. permission: ['admin.knowledge_base'],
  5487. },
  5488. frontend: true
  5489. )
  5490. Setting.create_if_not_exists(
  5491. title: __('Knowledge Base active publicly'),
  5492. name: 'kb_active_publicly',
  5493. area: 'Kb::Core',
  5494. description: __('Defines if Knowledge Base navbar button is enabled for users without Knowledge Base permission.'),
  5495. state: false,
  5496. preferences: {
  5497. prio: 1,
  5498. trigger: ['menu:render'],
  5499. authentication: true,
  5500. permission: [],
  5501. },
  5502. frontend: true
  5503. )
  5504. Setting.create_if_not_exists(
  5505. title: __('Defines the timeframe during which a self-created note can be deleted.'),
  5506. name: 'ui_ticket_zoom_article_delete_timeframe',
  5507. area: 'UI::TicketZoomArticle',
  5508. description: __("Set timeframe in seconds. If it's set to 0 you can delete notes without time limits"),
  5509. options: {},
  5510. state: 600,
  5511. preferences: {
  5512. permission: ['admin.ui']
  5513. },
  5514. frontend: true
  5515. )
  5516. Setting.create_if_not_exists(
  5517. title: __('Hint for adding an article to an existing ticket.'),
  5518. name: 'ui_ticket_add_article_hint',
  5519. area: 'UI::TicketZoomArticle',
  5520. description: __('Highlights if the note a user is writing is public or private'),
  5521. options: {},
  5522. state: {
  5523. # 'note-internal' => 'You are writing an |internal note|, only people of your organization will see it.',
  5524. # 'note-public' => 'You are writing a |public note|.',
  5525. # 'phone-internal' => 'You are writing an |internal phone note|, only people of your organization will see it.',
  5526. # 'phone-public' => 'You are writing a |public phone note|.',
  5527. # ....
  5528. },
  5529. preferences: {
  5530. permission: ['admin.ui'],
  5531. },
  5532. frontend: true
  5533. )
  5534. Setting.create_if_not_exists(
  5535. title: __('Ticket Overview Query Polling'),
  5536. name: 'ui_ticket_overview_query_polling',
  5537. area: 'UI::TicketOverview::QueryPolling',
  5538. description: __('System-wide configuration of the query polling mechanism for ticket overviews.'),
  5539. options: {},
  5540. state: {
  5541. enabled: true,
  5542. page_size: 30,
  5543. background: {
  5544. calculation_count: 3,
  5545. interval_sec: 10,
  5546. cache_ttl_sec: 10,
  5547. },
  5548. foreground: {
  5549. interval_sec: 5,
  5550. cache_ttl_sec: 5,
  5551. },
  5552. counts: {
  5553. interval_sec: 60,
  5554. cache_ttl_sec: 60,
  5555. },
  5556. },
  5557. preferences: {
  5558. permission: ['admin.ui'],
  5559. },
  5560. frontend: true
  5561. )
  5562. Setting.create_if_not_exists(
  5563. title: __('S/MIME integration'),
  5564. name: 'smime_integration',
  5565. area: 'Integration::Switch',
  5566. description: __('Defines if S/MIME encryption is enabled or not.'),
  5567. options: {
  5568. form: [
  5569. {
  5570. display: '',
  5571. null: true,
  5572. name: 'smime_integration',
  5573. tag: 'boolean',
  5574. options: {
  5575. true => 'yes',
  5576. false => 'no',
  5577. },
  5578. },
  5579. ],
  5580. },
  5581. state: false,
  5582. preferences: {
  5583. prio: 1,
  5584. authentication: true,
  5585. permission: ['admin.integration'],
  5586. },
  5587. frontend: true
  5588. )
  5589. Setting.create_if_not_exists(
  5590. title: __('S/MIME config'),
  5591. name: 'smime_config',
  5592. area: 'Integration::SMIME',
  5593. description: __('Defines the S/MIME config.'),
  5594. options: {},
  5595. state: {},
  5596. preferences: {
  5597. prio: 2,
  5598. permission: ['admin.integration'],
  5599. },
  5600. frontend: true,
  5601. )
  5602. Setting.create_if_not_exists(
  5603. title: __('PGP integration'),
  5604. name: 'pgp_integration',
  5605. area: 'Integration::Switch',
  5606. description: __('Defines if PGP encryption is enabled or not.'),
  5607. options: {
  5608. form: [
  5609. {
  5610. display: '',
  5611. null: true,
  5612. name: 'pgp_integration',
  5613. tag: 'boolean',
  5614. options: {
  5615. true => 'yes',
  5616. false => 'no',
  5617. },
  5618. },
  5619. ],
  5620. },
  5621. state: false,
  5622. preferences: {
  5623. prio: 1,
  5624. authentication: true,
  5625. permission: ['admin.integration'],
  5626. },
  5627. frontend: true
  5628. )
  5629. Setting.create_if_not_exists(
  5630. title: __('PGP config'),
  5631. name: 'pgp_config',
  5632. area: 'Integration::PGP',
  5633. description: __('Defines the PGP config.'),
  5634. options: {},
  5635. state: {},
  5636. preferences: {
  5637. prio: 2,
  5638. permission: ['admin.integration'],
  5639. },
  5640. frontend: true,
  5641. )
  5642. Setting.create_if_not_exists(
  5643. title: __('PGP Recipient Alias Configuration'),
  5644. name: 'pgp_recipient_alias_configuration',
  5645. area: 'Core::Integration::PGP',
  5646. description: __('Defines if the PGP recipient alias configuration is enabled or not.'),
  5647. options: {},
  5648. state: false,
  5649. preferences: { online_service_disable: true },
  5650. frontend: true
  5651. )
  5652. Setting.create_if_not_exists(
  5653. title: __('Authentication via %s'),
  5654. name: 'auth_sso',
  5655. area: 'Security::ThirdPartyAuthentication',
  5656. description: __('Enables button for user authentication via %s. The button will redirect to /auth/sso on user interaction.'),
  5657. options: {
  5658. form: [
  5659. {
  5660. display: '',
  5661. null: true,
  5662. name: 'auth_sso',
  5663. tag: 'boolean',
  5664. options: {
  5665. true => 'yes',
  5666. false => 'no',
  5667. },
  5668. },
  5669. ],
  5670. },
  5671. preferences: {
  5672. controller: 'SettingsAreaSwitch',
  5673. sub: {},
  5674. title_i18n: [__('SSO')],
  5675. description_i18n: [__('SSO')],
  5676. permission: ['admin.security'],
  5677. },
  5678. state: false,
  5679. frontend: true
  5680. )
  5681. Setting.create_if_not_exists(
  5682. title: __('Show calendar weeks in the picker of date/datetime fields'),
  5683. name: 'datepicker_show_calendar_weeks',
  5684. area: 'System::UI',
  5685. description: __('Defines if calendar weeks are shown in the picker of date/datetime fields to easily select the correct date.'),
  5686. options: {
  5687. form: [
  5688. {
  5689. display: '',
  5690. null: true,
  5691. name: 'datepicker_show_calendar_weeks',
  5692. tag: 'boolean',
  5693. options: {
  5694. true => 'yes',
  5695. false => 'no',
  5696. },
  5697. },
  5698. ],
  5699. },
  5700. state: false,
  5701. preferences: {
  5702. render: true,
  5703. prio: 4,
  5704. permission: ['admin.system'],
  5705. },
  5706. frontend: true
  5707. )
  5708. Setting.create_if_not_exists(
  5709. title: __('Security Keys'),
  5710. name: 'two_factor_authentication_method_security_keys',
  5711. area: 'Security::TwoFactorAuthentication',
  5712. description: __('Defines if the two-factor authentication method security keys is enabled or not.'),
  5713. options: {
  5714. form: [
  5715. {
  5716. display: '',
  5717. null: true,
  5718. name: 'two_factor_authentication_method_security_keys',
  5719. tag: 'boolean',
  5720. options: {
  5721. true => 'yes',
  5722. false => 'no',
  5723. },
  5724. },
  5725. ],
  5726. },
  5727. preferences: {
  5728. controller: 'SettingsAreaSwitch',
  5729. sub: {},
  5730. permission: ['admin.security'],
  5731. prio: 1000,
  5732. display_name: __('Security Keys'),
  5733. help: __('Complete the sign-in with your security key.'),
  5734. icon: 'security-key',
  5735. },
  5736. state: false,
  5737. frontend: true
  5738. )
  5739. Setting.create_if_not_exists(
  5740. title: __('Authenticator App'),
  5741. name: 'two_factor_authentication_method_authenticator_app',
  5742. area: 'Security::TwoFactorAuthentication',
  5743. description: __('Defines if the two-factor authentication method authenticator app is enabled or not.'),
  5744. options: {
  5745. form: [
  5746. {
  5747. display: '',
  5748. null: true,
  5749. name: 'two_factor_authentication_method_authenticator_app',
  5750. tag: 'boolean',
  5751. options: {
  5752. true => 'yes',
  5753. false => 'no',
  5754. },
  5755. },
  5756. ],
  5757. },
  5758. preferences: {
  5759. controller: 'SettingsAreaSwitch',
  5760. sub: {},
  5761. permission: ['admin.security'],
  5762. prio: 2000,
  5763. display_name: __('Authenticator App'),
  5764. help: __('Get the security code from the authenticator app on your device.'),
  5765. icon: 'mobile-code',
  5766. },
  5767. state: false,
  5768. frontend: true
  5769. )
  5770. Setting.create_if_not_exists(
  5771. title: __('Enable Recovery Codes'),
  5772. name: 'two_factor_authentication_recovery_codes',
  5773. area: 'Security::TwoFactorAuthentication',
  5774. description: __('Defines if recovery codes can be used by users in the event they lose access to other two-factor authentication methods.'),
  5775. options: {
  5776. form: [
  5777. {
  5778. display: '',
  5779. null: true,
  5780. name: 'two_factor_authentication_recovery_codes',
  5781. tag: 'boolean',
  5782. options: {
  5783. true => 'yes',
  5784. false => 'no',
  5785. },
  5786. },
  5787. ],
  5788. },
  5789. preferences: {
  5790. prio: 5000,
  5791. permission: ['admin.security'],
  5792. },
  5793. state: true,
  5794. frontend: true
  5795. )
  5796. Setting.create_if_not_exists(
  5797. title: __('Enforce the setup of the two-factor authentication'),
  5798. name: 'two_factor_authentication_enforce_role_ids',
  5799. area: 'Security::TwoFactorAuthentication',
  5800. description: __('Requires the setup of the two-factor authentication for certain user roles.'),
  5801. options: {
  5802. form: [
  5803. {
  5804. display: __('Enforced for user roles'),
  5805. null: true,
  5806. name: 'two_factor_authentication_enforce_role_ids',
  5807. tag: 'column_select',
  5808. relation: 'Role',
  5809. translate: true,
  5810. },
  5811. ],
  5812. },
  5813. preferences: {
  5814. permission: ['admin.security'],
  5815. prio: 6000,
  5816. },
  5817. state: [2],
  5818. frontend: true
  5819. )
  5820. Setting.create_if_not_exists(
  5821. title: __('Ticket Organization Reassignment'),
  5822. name: 'ticket_organization_reassignment',
  5823. area: 'Ticket::Base',
  5824. description: __('Defines if the change of the primary organization of a user will update the 100 most recent tickets for this user as well.'),
  5825. options: {
  5826. form: [
  5827. {
  5828. display: '',
  5829. null: false,
  5830. name: 'ticket_organization_reassignment',
  5831. tag: 'boolean',
  5832. options: {
  5833. true => __('Update the most recent tickets.'),
  5834. false => __('Do not update any tickets.'),
  5835. },
  5836. translate: true,
  5837. },
  5838. ],
  5839. },
  5840. state: true,
  5841. preferences: {
  5842. prio: 4000,
  5843. permission: ['admin.ticket'],
  5844. },
  5845. frontend: true
  5846. )
  5847. Setting.create_if_not_exists(
  5848. title: __('Checklists'),
  5849. name: 'checklist',
  5850. area: 'Web::Base',
  5851. description: __('Enable checklists.'),
  5852. options: {
  5853. form: [
  5854. {
  5855. display: '',
  5856. null: true,
  5857. name: 'checklist',
  5858. tag: 'boolean',
  5859. options: {
  5860. true => 'yes',
  5861. false => 'no',
  5862. },
  5863. },
  5864. ],
  5865. },
  5866. preferences: {
  5867. authentication: true,
  5868. permission: ['admin.checklist'],
  5869. },
  5870. state: true,
  5871. frontend: true
  5872. )
  5873. Setting.create_if_not_exists(
  5874. title: __('Auto Shutdown'),
  5875. name: 'auto_shutdown',
  5876. area: 'Core::WebApp',
  5877. 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.'),
  5878. options: {},
  5879. state: !Rails.env.test?,
  5880. preferences: { online_service_disable: true },
  5881. frontend: false
  5882. )