settings.rb 151 KB

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