settings.rb 155 KB

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