settings.rb 133 KB

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