settings.rb 133 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042
  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. translate: true,
  219. },
  220. ],
  221. },
  222. preferences: {
  223. render: true,
  224. prio: 10,
  225. permission: ['admin.branding'],
  226. },
  227. state: 'relative',
  228. frontend: true
  229. )
  230. options = {}
  231. (10..99).each do |item|
  232. options[item] = item
  233. end
  234. system_id = rand(10..99) # rubocop:disable Zammad/ForbidRand
  235. Setting.create_if_not_exists(
  236. title: __('SystemID'),
  237. name: 'system_id',
  238. area: 'System::Base',
  239. description: __('Defines the system identifier. Every ticket number contains this ID. This ensures that only tickets which belong to your system will be processed as follow-ups (useful when communicating between two instances of Zammad).'),
  240. options: {
  241. form: [
  242. {
  243. display: '',
  244. null: true,
  245. name: 'system_id',
  246. tag: 'select',
  247. options: options,
  248. },
  249. ],
  250. },
  251. state: system_id,
  252. preferences: {
  253. online_service_disable: true,
  254. placeholder: true,
  255. authentication: true,
  256. permission: ['admin.system'],
  257. },
  258. frontend: true
  259. )
  260. Setting.create_if_not_exists(
  261. title: __('Fully Qualified Domain Name'),
  262. name: 'fqdn',
  263. area: 'System::Base',
  264. description: __('Defines the fully qualified domain name of the system. This setting is used as a variable, #{setting.fqdn} which is found in all forms of messaging used by the application, to build links to the tickets within your system.'), # rubocop:disable Lint/InterpolationCheck
  265. options: {
  266. form: [
  267. {
  268. display: '',
  269. null: false,
  270. name: 'fqdn',
  271. tag: 'input',
  272. },
  273. ],
  274. },
  275. state: 'zammad.example.com',
  276. preferences: {
  277. online_service_disable: true,
  278. placeholder: true,
  279. permission: ['admin.system'],
  280. },
  281. frontend: true
  282. )
  283. Setting.create_if_not_exists(
  284. title: __('Websocket backend'),
  285. name: 'websocket_backend',
  286. area: 'System::WebSocket',
  287. description: __('Defines how to reach websocket server. "websocket" is default on production, "websocketPort" is for CI'),
  288. state: Rails.env.production? ? 'websocket' : 'websocketPort',
  289. frontend: true
  290. )
  291. Setting.create_if_not_exists(
  292. title: __('Websocket port'),
  293. name: 'websocket_port',
  294. area: 'System::WebSocket',
  295. description: __('Defines the port of the websocket server.'),
  296. options: {
  297. form: [
  298. {
  299. display: '',
  300. null: false,
  301. name: 'websocket_port',
  302. tag: 'input',
  303. },
  304. ],
  305. },
  306. state: '6042',
  307. preferences: { online_service_disable: true },
  308. frontend: true
  309. )
  310. Setting.create_if_not_exists(
  311. title: __('HTTP type'),
  312. name: 'http_type',
  313. area: 'System::Base',
  314. description: __('Defines the HTTP protocol of your instance.'),
  315. options: {
  316. form: [
  317. {
  318. display: '',
  319. null: true,
  320. name: 'http_type',
  321. tag: 'select',
  322. options: {
  323. 'https' => 'https',
  324. 'http' => 'http',
  325. },
  326. },
  327. ],
  328. },
  329. state: 'http',
  330. preferences: {
  331. online_service_disable: true,
  332. placeholder: true,
  333. permission: ['admin.system'],
  334. },
  335. frontend: true
  336. )
  337. Setting.create_if_not_exists(
  338. title: __('Storage Mechanism'),
  339. name: 'storage_provider',
  340. area: 'System::Storage',
  341. description: __('"Database" stores all attachments in the database (not recommended for storing large amounts of data). "Filesystem" stores the data in the filesystem. You can switch between the modules even on a system that is already in production without any loss of data.'),
  342. options: {
  343. form: [
  344. {
  345. display: '',
  346. null: true,
  347. name: 'storage_provider',
  348. tag: 'select',
  349. tranlate: true,
  350. options: {
  351. 'DB' => __('Database'),
  352. 'File' => __('Filesystem'),
  353. },
  354. translate: true,
  355. },
  356. ],
  357. },
  358. state: 'DB',
  359. preferences: {
  360. controller: 'SettingsAreaStorageProvider',
  361. online_service_disable: true,
  362. permission: ['admin.system'],
  363. },
  364. frontend: false
  365. )
  366. Setting.create_if_not_exists(
  367. title: __('Image Service'),
  368. name: 'image_backend',
  369. area: 'System::Services',
  370. description: __('Defines the backend for user and organization image lookups.'),
  371. options: {
  372. form: [
  373. {
  374. display: '',
  375. null: true,
  376. name: 'image_backend',
  377. tag: 'select',
  378. options: {
  379. '' => '-',
  380. 'Service::Image::Zammad' => __('Zammad Image Service'),
  381. },
  382. },
  383. ],
  384. },
  385. state: 'Service::Image::Zammad',
  386. preferences: {
  387. prio: 1,
  388. permission: ['admin.system'],
  389. },
  390. frontend: false
  391. )
  392. Setting.create_if_not_exists(
  393. title: __('Geo IP Service'),
  394. name: 'geo_ip_backend',
  395. area: 'System::Services',
  396. description: __('Defines the backend for geo IP lookups. Also shows location of an IP address if it is traceable.'),
  397. options: {
  398. form: [
  399. {
  400. display: '',
  401. null: true,
  402. name: 'geo_ip_backend',
  403. tag: 'select',
  404. options: {
  405. '' => '-',
  406. 'Service::GeoIp::Zammad' => __('Zammad GeoIP Service'),
  407. },
  408. },
  409. ],
  410. },
  411. state: 'Service::GeoIp::Zammad',
  412. preferences: {
  413. prio: 2,
  414. permission: ['admin.system'],
  415. },
  416. frontend: false
  417. )
  418. Setting.create_if_not_exists(
  419. title: __('Geo Location Service'),
  420. name: 'geo_location_backend',
  421. area: 'System::Services',
  422. description: __('Defines the backend for geo location lookups to store geo locations for addresses.'),
  423. options: {
  424. form: [
  425. {
  426. display: '',
  427. null: true,
  428. name: 'geo_location_backend',
  429. tag: 'select',
  430. options: {
  431. '' => '-',
  432. 'Service::GeoLocation::Gmaps' => __('Google Maps'),
  433. },
  434. },
  435. ],
  436. },
  437. state: 'Service::GeoLocation::Gmaps',
  438. preferences: {
  439. prio: 3,
  440. permission: ['admin.system'],
  441. },
  442. frontend: false
  443. )
  444. Setting.create_if_not_exists(
  445. title: __('Geo Calendar Service'),
  446. name: 'geo_calendar_backend',
  447. area: 'System::Services',
  448. description: __('Defines the backend for geo calendar lookups. Used for initial calendar succession.'),
  449. options: {
  450. form: [
  451. {
  452. display: '',
  453. null: true,
  454. name: 'geo_calendar_backend',
  455. tag: 'select',
  456. options: {
  457. '' => '-',
  458. 'Service::GeoCalendar::Zammad' => __('Zammad GeoCalendar Service'),
  459. },
  460. },
  461. ],
  462. },
  463. state: 'Service::GeoCalendar::Zammad',
  464. preferences: {
  465. prio: 2,
  466. permission: ['admin.system'],
  467. },
  468. frontend: false
  469. )
  470. Setting.create_if_not_exists(
  471. title: __('Proxy Settings'),
  472. name: 'proxy',
  473. area: 'System::Network',
  474. description: __('Address of the proxy server for http and https resources.'),
  475. options: {
  476. form: [
  477. {
  478. display: '',
  479. null: false,
  480. name: 'proxy',
  481. tag: 'input',
  482. placeholder: 'proxy.example.com:3128',
  483. },
  484. ],
  485. },
  486. state: '',
  487. preferences: {
  488. online_service_disable: true,
  489. controller: 'SettingsAreaProxy',
  490. prio: 1,
  491. permission: ['admin.system'],
  492. },
  493. frontend: false
  494. )
  495. Setting.create_if_not_exists(
  496. title: __('Proxy User'),
  497. name: 'proxy_username',
  498. area: 'System::Network',
  499. description: __('Username for proxy connection.'),
  500. options: {
  501. form: [
  502. {
  503. display: '',
  504. null: false,
  505. name: 'proxy_username',
  506. tag: 'input',
  507. },
  508. ],
  509. },
  510. state: '',
  511. preferences: {
  512. disabled: true,
  513. online_service_disable: true,
  514. prio: 2,
  515. permission: ['admin.system'],
  516. },
  517. frontend: false
  518. )
  519. Setting.create_if_not_exists(
  520. title: __('Proxy Password'),
  521. name: 'proxy_password',
  522. area: 'System::Network',
  523. description: __('Password for proxy connection.'),
  524. options: {
  525. form: [
  526. {
  527. display: '',
  528. null: false,
  529. name: 'proxy_password',
  530. tag: 'input',
  531. },
  532. ],
  533. },
  534. state: '',
  535. preferences: {
  536. disabled: true,
  537. online_service_disable: true,
  538. prio: 3,
  539. permission: ['admin.system'],
  540. },
  541. frontend: false
  542. )
  543. Setting.create_if_not_exists(
  544. title: __('No Proxy'),
  545. name: 'proxy_no',
  546. area: 'System::Network',
  547. description: __('No proxy for the following hosts.'),
  548. options: {
  549. form: [
  550. {
  551. display: '',
  552. null: false,
  553. name: 'proxy_no',
  554. tag: 'input',
  555. },
  556. ],
  557. },
  558. state: 'localhost,127.0.0.0,::1',
  559. preferences: {
  560. disabled: true,
  561. online_service_disable: true,
  562. prio: 4,
  563. permission: ['admin.system'],
  564. },
  565. frontend: false
  566. )
  567. Setting.create_if_not_exists(
  568. title: __('Core Workflow Ajax Mode'),
  569. name: 'core_workflow_ajax_mode',
  570. area: 'System::UI',
  571. description: __('Defines if the core workflow communication should run over ajax instead of websockets.'),
  572. options: {
  573. form: [
  574. {
  575. display: '',
  576. null: true,
  577. name: 'core_workflow_ajax_mode',
  578. tag: 'boolean',
  579. options: {
  580. true => 'yes',
  581. false => 'no',
  582. },
  583. },
  584. ],
  585. },
  586. state: false,
  587. preferences: {
  588. prio: 3,
  589. permission: ['admin.system'],
  590. },
  591. frontend: true
  592. )
  593. Setting.create_if_not_exists(
  594. title: __('User Organization Selector - email'),
  595. name: 'ui_user_organization_selector_with_email',
  596. area: 'UI::UserOrganizatiomSelector',
  597. description: __('Defines if the email should be displayed in the result of the user/organization widget.'),
  598. options: {
  599. form: [
  600. {
  601. display: '',
  602. null: true,
  603. name: 'ui_user_organization_selector_with_email',
  604. tag: 'boolean',
  605. translate: true,
  606. options: {
  607. true => 'yes',
  608. false => 'no',
  609. },
  610. },
  611. ],
  612. },
  613. state: false,
  614. preferences: {
  615. prio: 100,
  616. permission: ['admin.ui'],
  617. },
  618. frontend: true
  619. )
  620. Setting.create_if_not_exists(
  621. title: __('Note - default visibility'),
  622. name: 'ui_ticket_zoom_article_note_new_internal',
  623. area: 'UI::TicketZoom',
  624. description: __('Defines the default visibility for new notes.'),
  625. options: {
  626. form: [
  627. {
  628. display: '',
  629. null: true,
  630. name: 'ui_ticket_zoom_article_note_new_internal',
  631. tag: 'boolean',
  632. translate: true,
  633. options: {
  634. true => 'internal',
  635. false => 'public',
  636. },
  637. },
  638. ],
  639. },
  640. state: true,
  641. preferences: {
  642. prio: 100,
  643. permission: ['admin.ui'],
  644. },
  645. frontend: true
  646. )
  647. Setting.create_if_not_exists(
  648. title: __('Article - visibility confirmation dialog'),
  649. name: 'ui_ticket_zoom_article_visibility_confirmation_dialog',
  650. area: 'UI::TicketZoom',
  651. description: __('Defines if the agent has to accept a confirmation dialog when changing the article visibility to "public".'),
  652. options: {
  653. form: [
  654. {
  655. display: '',
  656. null: true,
  657. name: 'ui_ticket_zoom_article_visibility_confirmation_dialog',
  658. tag: 'boolean',
  659. options: {
  660. true => 'yes',
  661. false => 'no',
  662. },
  663. },
  664. ],
  665. },
  666. state: false,
  667. preferences: {
  668. prio: 100,
  669. permission: ['admin.ui'],
  670. },
  671. frontend: true
  672. )
  673. Setting.create_if_not_exists(
  674. title: __('Email - subject field'),
  675. name: 'ui_ticket_zoom_article_email_subject',
  676. area: 'UI::TicketZoom',
  677. description: __('Use subject field for emails. If disabled, the ticket title will be used as subject.'),
  678. options: {
  679. form: [
  680. {
  681. display: '',
  682. null: true,
  683. name: 'ui_ticket_zoom_article_email_subject',
  684. tag: 'boolean',
  685. translate: true,
  686. options: {
  687. true => 'yes',
  688. false => 'no',
  689. },
  690. },
  691. ],
  692. },
  693. state: false,
  694. preferences: {
  695. prio: 200,
  696. permission: ['admin.ui'],
  697. },
  698. frontend: true
  699. )
  700. Setting.create_if_not_exists(
  701. title: __('Email - full quote'),
  702. name: 'ui_ticket_zoom_article_email_full_quote',
  703. area: 'UI::TicketZoom',
  704. description: __('Enable if you want to quote the full email in your answer. The quoted email will be put at the end of your answer. If you just want to quote a certain phrase, just mark the text and press reply (this feature is always available).'),
  705. options: {
  706. form: [
  707. {
  708. display: '',
  709. null: true,
  710. name: 'ui_ticket_zoom_article_email_full_quote',
  711. tag: 'boolean',
  712. translate: true,
  713. options: {
  714. true => 'yes',
  715. false => 'no',
  716. },
  717. },
  718. ],
  719. },
  720. state: false,
  721. preferences: {
  722. prio: 220,
  723. permission: ['admin.ui'],
  724. },
  725. frontend: true
  726. )
  727. Setting.create_if_not_exists(
  728. title: __('Email - quote header'),
  729. name: 'ui_ticket_zoom_article_email_full_quote_header',
  730. area: 'UI::TicketZoom',
  731. description: __('Enable if you want a timestamped reply header to be automatically inserted in front of quoted messages.'),
  732. options: {
  733. form: [
  734. {
  735. display: '',
  736. null: true,
  737. name: 'ui_ticket_zoom_article_email_full_quote_header',
  738. tag: 'boolean',
  739. translate: true,
  740. options: {
  741. true => 'yes',
  742. false => 'no',
  743. },
  744. },
  745. ],
  746. },
  747. state: true,
  748. preferences: {
  749. prio: 240,
  750. permission: ['admin.ui'],
  751. },
  752. frontend: true
  753. )
  754. Setting.create_if_not_exists(
  755. title: __('Twitter - tweet initials'),
  756. name: 'ui_ticket_zoom_article_twitter_initials',
  757. area: 'UI::TicketZoom',
  758. description: __('Add sender initials to end of a tweet.'),
  759. options: {
  760. form: [
  761. {
  762. display: '',
  763. null: true,
  764. name: 'ui_ticket_zoom_article_twitter_initials',
  765. tag: 'boolean',
  766. translate: true,
  767. options: {
  768. true => 'yes',
  769. false => 'no',
  770. },
  771. },
  772. ],
  773. },
  774. state: true,
  775. preferences: {
  776. prio: 300,
  777. permission: ['admin.ui'],
  778. },
  779. frontend: true
  780. )
  781. Setting.create_if_not_exists(
  782. title: __('Sidebar Attachments'),
  783. name: 'ui_ticket_zoom_attachments_preview',
  784. area: 'UI::TicketZoom::Preview',
  785. description: __('Enables preview of attachments.'),
  786. options: {
  787. form: [
  788. {
  789. display: '',
  790. null: true,
  791. name: 'ui_ticket_zoom_attachments_preview',
  792. tag: 'boolean',
  793. translate: true,
  794. options: {
  795. true => 'yes',
  796. false => 'no',
  797. },
  798. },
  799. ],
  800. },
  801. state: true,
  802. preferences: {
  803. prio: 400,
  804. permission: ['admin.ui'],
  805. },
  806. frontend: true
  807. )
  808. Setting.create_if_not_exists(
  809. title: __('Sidebar Attachments'),
  810. name: 'ui_ticket_zoom_sidebar_article_attachments',
  811. area: 'UI::TicketZoom::Preview',
  812. description: __('Enables a sidebar to show an overview of all attachments.'),
  813. options: {
  814. form: [
  815. {
  816. display: '',
  817. null: true,
  818. name: 'ui_ticket_zoom_sidebar_article_attachments',
  819. tag: 'boolean',
  820. translate: true,
  821. options: {
  822. true => 'yes',
  823. false => 'no',
  824. },
  825. },
  826. ],
  827. },
  828. state: false,
  829. preferences: {
  830. prio: 500,
  831. permission: ['admin.ui'],
  832. },
  833. frontend: true
  834. )
  835. Setting.create_if_not_exists(
  836. title: __('Set notes for ticket create types.'),
  837. name: 'ui_ticket_create_notes',
  838. area: 'UI::TicketCreate',
  839. description: __('Set notes for ticket create types by selecting type.'),
  840. options: {},
  841. state: {
  842. # 'email-out' => __('Attention: When creating a ticket an email is sent.'),
  843. },
  844. preferences: {
  845. permission: ['admin.ui'],
  846. },
  847. frontend: true
  848. )
  849. Setting.create_if_not_exists(
  850. title: __('Default type for a new ticket'),
  851. name: 'ui_ticket_create_default_type',
  852. area: 'UI::TicketCreate',
  853. description: __('Select default ticket type'),
  854. options: {
  855. form: [
  856. {
  857. display: '',
  858. null: false,
  859. multiple: false,
  860. name: 'ui_ticket_create_default_type',
  861. tag: 'select',
  862. options: {
  863. 'phone-in' => '1. Phone inbound',
  864. 'phone-out' => '2. Phone outbound',
  865. 'email-out' => '3. Email outbound',
  866. },
  867. },
  868. ],
  869. },
  870. state: 'phone-in',
  871. preferences: {
  872. permission: ['admin.ui']
  873. },
  874. frontend: true
  875. )
  876. Setting.create_if_not_exists(
  877. title: __('Available types for a new ticket'),
  878. name: 'ui_ticket_create_available_types',
  879. area: 'UI::TicketCreate',
  880. description: __('Set available ticket types'),
  881. options: {
  882. form: [
  883. {
  884. display: '',
  885. null: false,
  886. multiple: true,
  887. name: 'ui_ticket_create_available_types',
  888. tag: 'select',
  889. options: {
  890. 'phone-in' => '1. Phone inbound',
  891. 'phone-out' => '2. Phone outbound',
  892. 'email-out' => '3. Email outbound',
  893. },
  894. },
  895. ],
  896. },
  897. state: %w[phone-in phone-out email-out],
  898. preferences: {
  899. permission: ['admin.ui']
  900. },
  901. frontend: true
  902. )
  903. Setting.create_if_not_exists(
  904. title: __('Open ticket indicator'),
  905. name: 'ui_sidebar_open_ticket_indicator_colored',
  906. area: 'UI::Sidebar',
  907. description: __('Color representation of the open ticket indicator in the sidebar.'),
  908. options: {
  909. form: [
  910. {
  911. display: '',
  912. null: true,
  913. name: 'ui_sidebar_open_ticket_indicator_colored',
  914. tag: 'boolean',
  915. translate: true,
  916. options: {
  917. true => 'yes',
  918. false => 'no',
  919. },
  920. },
  921. ],
  922. },
  923. state: false,
  924. preferences: {
  925. permission: ['admin.ui'],
  926. },
  927. frontend: true
  928. )
  929. Setting.create_if_not_exists(
  930. title: __('Open ticket indicator'),
  931. name: 'ui_table_group_by_show_count',
  932. area: 'UI::Base',
  933. description: __('Total display of the number of objects in a grouping.'),
  934. options: {
  935. form: [
  936. {
  937. display: '',
  938. null: true,
  939. name: 'ui_table_group_by_show_count',
  940. tag: 'boolean',
  941. translate: true,
  942. options: {
  943. true => 'yes',
  944. false => 'no',
  945. },
  946. },
  947. ],
  948. },
  949. state: false,
  950. preferences: {
  951. permission: ['admin.ui'],
  952. },
  953. frontend: true
  954. )
  955. Setting.create_if_not_exists(
  956. title: __('Priority Icons in Overviews'),
  957. name: 'ui_ticket_overview_priority_icon',
  958. area: 'UI::TicketOverview::PriorityIcons',
  959. description: __('Enables priority icons in ticket overviews.'),
  960. options: {
  961. form: [
  962. {
  963. display: '',
  964. null: true,
  965. name: 'ui_ticket_overview_priority_icon',
  966. tag: 'boolean',
  967. translate: true,
  968. options: {
  969. true => 'yes',
  970. false => 'no',
  971. },
  972. },
  973. ],
  974. },
  975. state: false,
  976. preferences: {
  977. prio: 500,
  978. permission: ['admin.ui'],
  979. },
  980. frontend: true
  981. )
  982. Setting.create_if_not_exists(
  983. title: __('Maximum number of ticket shown in overviews'),
  984. name: 'ui_ticket_overview_ticket_limit',
  985. area: 'UI::TicketOverview::TicketLimit',
  986. description: __('Define the maximum number of ticket shown in overviews.'),
  987. options: {},
  988. state: 2000,
  989. preferences: {
  990. permission: ['admin.overview'],
  991. },
  992. frontend: true
  993. )
  994. Setting.create_if_not_exists(
  995. title: __('Maximum number of allowed tasks before auto cleanup removes surplus tasks.'),
  996. name: 'ui_task_mananger_max_task_count',
  997. area: 'UI::TaskManager::Task::MaxCount',
  998. description: __('Defines the maximum number of allowed task bar tasks before auto cleanup removes surplus tasks when creating new tasks.'),
  999. options: {},
  1000. state: 30,
  1001. preferences: {
  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. translate: true,
  1879. },
  1880. ],
  1881. },
  1882. state: 1,
  1883. preferences: {
  1884. permission: ['admin.security'],
  1885. },
  1886. frontend: false
  1887. )
  1888. Setting.create_if_not_exists(
  1889. title: __('Digit required'),
  1890. name: 'password_need_digit',
  1891. area: 'Security::Password',
  1892. description: __('Password needs to contain at least one digit.'),
  1893. options: {
  1894. form: [
  1895. {
  1896. display: __('Needed'),
  1897. null: true,
  1898. name: 'password_need_digit',
  1899. tag: 'select',
  1900. options: {
  1901. 1 => 'yes',
  1902. 0 => 'no',
  1903. },
  1904. translate: true,
  1905. },
  1906. ],
  1907. },
  1908. state: 1,
  1909. preferences: {
  1910. permission: ['admin.security'],
  1911. },
  1912. frontend: false
  1913. )
  1914. Setting.create_if_not_exists(
  1915. title: __('Special character required'),
  1916. name: 'password_need_special_character',
  1917. area: 'Security::Password',
  1918. description: __('Password needs to contain at least one special character.'),
  1919. options: {
  1920. form: [
  1921. {
  1922. display: __('Needed'),
  1923. null: true,
  1924. name: 'password_need_special_character',
  1925. tag: 'select',
  1926. options: {
  1927. 1 => 'yes',
  1928. 0 => 'no',
  1929. },
  1930. translate: true,
  1931. },
  1932. ],
  1933. },
  1934. state: 0,
  1935. preferences: {
  1936. permission: ['admin.security'],
  1937. },
  1938. frontend: false
  1939. )
  1940. Setting.create_if_not_exists(
  1941. title: __('Maximum failed logins'),
  1942. name: 'password_max_login_failed',
  1943. area: 'Security::Password',
  1944. description: __('Defines after how many failed logins accounts will be deactivated.'),
  1945. options: {
  1946. form: [
  1947. {
  1948. display: '',
  1949. null: true,
  1950. name: 'password_max_login_failed',
  1951. tag: 'select',
  1952. options: {
  1953. 4 => ' 4',
  1954. 5 => ' 5',
  1955. 6 => ' 6',
  1956. 7 => ' 7',
  1957. 8 => ' 8',
  1958. 9 => ' 9',
  1959. 10 => '10',
  1960. 11 => '11',
  1961. 13 => '13',
  1962. 14 => '14',
  1963. 15 => '15',
  1964. 16 => '16',
  1965. 17 => '17',
  1966. 18 => '18',
  1967. 19 => '19',
  1968. 20 => '20',
  1969. },
  1970. },
  1971. ],
  1972. },
  1973. state: 5,
  1974. preferences: {
  1975. authentication: true,
  1976. permission: ['admin.security'],
  1977. },
  1978. frontend: true
  1979. )
  1980. Setting.create_if_not_exists(
  1981. title: __('Ticket Hook'),
  1982. name: 'ticket_hook',
  1983. area: 'Ticket::Base',
  1984. description: __('The identifier for a ticket, e.g. Ticket#, Call#, MyTicket#. The default is Ticket#.'),
  1985. options: {
  1986. form: [
  1987. {
  1988. display: '',
  1989. null: false,
  1990. name: 'ticket_hook',
  1991. tag: 'input',
  1992. },
  1993. ],
  1994. },
  1995. preferences: {
  1996. render: true,
  1997. placeholder: true,
  1998. authentication: true,
  1999. permission: ['admin.ticket'],
  2000. },
  2001. state: 'Ticket#',
  2002. frontend: true
  2003. )
  2004. Setting.create_if_not_exists(
  2005. title: __('Ticket Hook Divider'),
  2006. name: 'ticket_hook_divider',
  2007. area: 'Ticket::Base::Shadow',
  2008. description: __('The divider between TicketHook and ticket number. E. g. \': \'.'),
  2009. options: {
  2010. form: [
  2011. {
  2012. display: '',
  2013. null: true,
  2014. name: 'ticket_hook_divider',
  2015. tag: 'input',
  2016. },
  2017. ],
  2018. },
  2019. state: '',
  2020. preferences: {
  2021. permission: ['admin.ticket'],
  2022. },
  2023. frontend: false
  2024. )
  2025. Setting.create_if_not_exists(
  2026. title: __('Ticket Hook Position'),
  2027. name: 'ticket_hook_position',
  2028. area: 'Ticket::Base',
  2029. description: __("The format of the subject.
  2030. * **Right** means **Some Subject [Ticket#12345]**
  2031. * **Left** means **[Ticket#12345] Some Subject**
  2032. * **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."),
  2033. options: {
  2034. form: [
  2035. {
  2036. display: '',
  2037. null: true,
  2038. name: 'ticket_hook_position',
  2039. tag: 'select',
  2040. translate: true,
  2041. options: {
  2042. 'left' => __('left'),
  2043. 'right' => __('right'),
  2044. 'none' => __('none'),
  2045. },
  2046. },
  2047. ],
  2048. },
  2049. state: 'right',
  2050. preferences: {
  2051. controller: 'SettingsAreaTicketHookPosition',
  2052. permission: ['admin.ticket'],
  2053. },
  2054. frontend: false
  2055. )
  2056. Setting.create_if_not_exists(
  2057. title: __('Ticket Last Contact Behaviour'),
  2058. name: 'ticket_last_contact_behaviour',
  2059. area: 'Ticket::Base',
  2060. description: __('Defines how the last customer contact time of tickets should be calculated.'),
  2061. options: {
  2062. form: [
  2063. {
  2064. display: '',
  2065. null: true,
  2066. name: 'ticket_last_contact_behaviour',
  2067. tag: 'select',
  2068. translate: true,
  2069. options: {
  2070. 'based_on_customer_reaction' => __('Use the time of the very last customer article.'),
  2071. 'check_if_agent_already_replied' => __('Use the start time of the last customer thread (which may consist of multiple articles).'),
  2072. },
  2073. },
  2074. ],
  2075. },
  2076. state: 'check_if_agent_already_replied',
  2077. preferences: {
  2078. permission: ['admin.ticket'],
  2079. },
  2080. frontend: false
  2081. )
  2082. Setting.create_if_not_exists(
  2083. title: __('Ticket Number Format'),
  2084. name: 'ticket_number',
  2085. area: 'Ticket::Number',
  2086. description: __("Selects the ticket number generator module.
  2087. * **Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  2088. * 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)."),
  2089. options: {
  2090. form: [
  2091. {
  2092. display: '',
  2093. null: true,
  2094. name: 'ticket_number',
  2095. tag: 'select',
  2096. translate: true,
  2097. options: {
  2098. 'Ticket::Number::Increment' => __('Increment (SystemID.Counter)'),
  2099. 'Ticket::Number::Date' => __('Date (Year.Month.Day.SystemID.Counter)'),
  2100. },
  2101. },
  2102. ],
  2103. },
  2104. state: 'Ticket::Number::Increment',
  2105. preferences: {
  2106. settings_included: %w[ticket_number_increment ticket_number_date],
  2107. controller: 'SettingsAreaTicketNumber',
  2108. permission: ['admin.ticket'],
  2109. },
  2110. frontend: false
  2111. )
  2112. Setting.create_if_not_exists(
  2113. title: __('Ticket Number Increment'),
  2114. name: 'ticket_number_increment',
  2115. area: 'Ticket::Number',
  2116. description: '-',
  2117. options: {
  2118. form: [
  2119. {
  2120. display: __('Checksum'),
  2121. null: true,
  2122. name: 'checksum',
  2123. tag: 'boolean',
  2124. options: {
  2125. true => 'yes',
  2126. false => 'no',
  2127. },
  2128. },
  2129. {
  2130. display: __('Min. size of number'),
  2131. null: true,
  2132. name: 'min_size',
  2133. tag: 'select',
  2134. options: {
  2135. 1 => ' 1',
  2136. 2 => ' 2',
  2137. 3 => ' 3',
  2138. 4 => ' 4',
  2139. 5 => ' 5',
  2140. 6 => ' 6',
  2141. 7 => ' 7',
  2142. 8 => ' 8',
  2143. 9 => ' 9',
  2144. 10 => '10',
  2145. 11 => '11',
  2146. 12 => '12',
  2147. 13 => '13',
  2148. 14 => '14',
  2149. 15 => '15',
  2150. 16 => '16',
  2151. 17 => '17',
  2152. 18 => '18',
  2153. 19 => '19',
  2154. 20 => '20',
  2155. },
  2156. },
  2157. ],
  2158. },
  2159. state: {
  2160. checksum: false,
  2161. min_size: 5,
  2162. },
  2163. preferences: {
  2164. permission: ['admin.ticket'],
  2165. hidden: true,
  2166. },
  2167. frontend: false
  2168. )
  2169. Setting.create_if_not_exists(
  2170. title: __('Ticket Number Increment Date'),
  2171. name: 'ticket_number_date',
  2172. area: 'Ticket::Number',
  2173. description: '-',
  2174. options: {
  2175. form: [
  2176. {
  2177. display: __('Checksum'),
  2178. null: true,
  2179. name: 'checksum',
  2180. tag: 'boolean',
  2181. options: {
  2182. true => 'yes',
  2183. false => 'no',
  2184. },
  2185. },
  2186. ],
  2187. },
  2188. state: {
  2189. checksum: false
  2190. },
  2191. preferences: {
  2192. permission: ['admin.ticket'],
  2193. hidden: true,
  2194. },
  2195. frontend: false
  2196. )
  2197. Setting.create_if_not_exists(
  2198. title: __('Auto Assignment'),
  2199. name: 'ticket_auto_assignment',
  2200. area: 'Web::Base',
  2201. description: __('Enable ticket auto assignment.'),
  2202. options: {
  2203. form: [
  2204. {
  2205. display: '',
  2206. null: true,
  2207. name: 'ticket_auto_assignment',
  2208. tag: 'boolean',
  2209. options: {
  2210. true => 'yes',
  2211. false => 'no',
  2212. },
  2213. },
  2214. ],
  2215. },
  2216. preferences: {
  2217. authentication: true,
  2218. permission: ['admin.ticket_auto_assignment'],
  2219. },
  2220. state: false,
  2221. frontend: true
  2222. )
  2223. Setting.create_if_not_exists(
  2224. title: __('Time Accounting Selector'),
  2225. name: 'ticket_auto_assignment_selector',
  2226. area: 'Web::Base',
  2227. description: __('Enable auto assignment for following matching tickets.'),
  2228. options: {
  2229. form: [
  2230. {},
  2231. ],
  2232. },
  2233. preferences: {
  2234. authentication: true,
  2235. permission: ['admin.ticket_auto_assignment'],
  2236. },
  2237. state: { condition: { 'ticket.state_id' => { operator: 'is', value: Ticket::State.by_category(:work_on).pluck(:id) } } },
  2238. frontend: true
  2239. )
  2240. Setting.create_or_update(
  2241. title: __('Time Accounting Selector'),
  2242. name: 'ticket_auto_assignment_user_ids_ignore',
  2243. area: 'Web::Base',
  2244. description: __('Define an exception of "automatic assignment" for certain users (e.g. executives).'),
  2245. options: {
  2246. form: [
  2247. {},
  2248. ],
  2249. },
  2250. preferences: {
  2251. authentication: true,
  2252. permission: ['admin.ticket_auto_assignment'],
  2253. },
  2254. state: [],
  2255. frontend: true
  2256. )
  2257. Setting.create_if_not_exists(
  2258. title: __('Ticket Number ignore system_id'),
  2259. name: 'ticket_number_ignore_system_id',
  2260. area: 'Ticket::Core',
  2261. description: '-',
  2262. options: {
  2263. form: [
  2264. {
  2265. display: __('Ignore system_id'),
  2266. null: true,
  2267. name: 'ticket_number_ignore_system_id',
  2268. tag: 'boolean',
  2269. options: {
  2270. true => 'yes',
  2271. false => 'no',
  2272. },
  2273. },
  2274. ],
  2275. },
  2276. state: false,
  2277. preferences: {
  2278. permission: ['admin.ticket'],
  2279. hidden: true,
  2280. },
  2281. frontend: false
  2282. )
  2283. Setting.create_if_not_exists(
  2284. title: __('Recursive Ticket Triggers'),
  2285. name: 'ticket_trigger_recursive',
  2286. area: 'Ticket::Core',
  2287. description: __('Activate the recursive processing of ticket triggers.'),
  2288. options: {
  2289. form: [
  2290. {
  2291. display: __('Recursive Ticket Triggers'),
  2292. null: true,
  2293. name: 'ticket_trigger_recursive',
  2294. tag: 'boolean',
  2295. options: {
  2296. true => 'yes',
  2297. false => 'no',
  2298. },
  2299. },
  2300. ],
  2301. },
  2302. state: false,
  2303. preferences: {
  2304. permission: ['admin.ticket'],
  2305. hidden: true,
  2306. },
  2307. frontend: false
  2308. )
  2309. Setting.create_if_not_exists(
  2310. title: __('Recursive Ticket Triggers Loop Max.'),
  2311. name: 'ticket_trigger_recursive_max_loop',
  2312. area: 'Ticket::Core',
  2313. description: __('Maximum number of recursively executed triggers.'),
  2314. options: {
  2315. form: [
  2316. {
  2317. display: __('Recursive Ticket Triggers'),
  2318. null: true,
  2319. name: 'ticket_trigger_recursive_max_loop',
  2320. tag: 'select',
  2321. options: {
  2322. 1 => ' 1',
  2323. 2 => ' 2',
  2324. 3 => ' 3',
  2325. 4 => ' 4',
  2326. 5 => ' 5',
  2327. 6 => ' 6',
  2328. 7 => ' 7',
  2329. 8 => ' 8',
  2330. 9 => ' 9',
  2331. 10 => '10',
  2332. 11 => '11',
  2333. 12 => '12',
  2334. 13 => '13',
  2335. 14 => '14',
  2336. 15 => '15',
  2337. 16 => '16',
  2338. 17 => '17',
  2339. 18 => '18',
  2340. 19 => '19',
  2341. 20 => '20',
  2342. },
  2343. },
  2344. ],
  2345. },
  2346. state: 10,
  2347. preferences: {
  2348. permission: ['admin.ticket'],
  2349. hidden: true,
  2350. },
  2351. frontend: false
  2352. )
  2353. Setting.create_if_not_exists(
  2354. title: __('Enable Ticket creation'),
  2355. name: 'customer_ticket_create',
  2356. area: 'CustomerWeb::Base',
  2357. description: __('Defines if a customer can create tickets via the web interface.'),
  2358. options: {
  2359. form: [
  2360. {
  2361. display: '',
  2362. null: true,
  2363. name: 'customer_ticket_create',
  2364. tag: 'boolean',
  2365. options: {
  2366. true => 'yes',
  2367. false => 'no',
  2368. },
  2369. },
  2370. ],
  2371. },
  2372. state: true,
  2373. preferences: {
  2374. authentication: true,
  2375. permission: ['admin.channel_web'],
  2376. },
  2377. frontend: true
  2378. )
  2379. Setting.create_if_not_exists(
  2380. title: __('Group selection for Ticket creation'),
  2381. name: 'customer_ticket_create_group_ids',
  2382. area: 'CustomerWeb::Base',
  2383. description: __('Defines groups for which a customer can create tickets via web interface. "-" means all groups are available.'),
  2384. options: {
  2385. form: [
  2386. {
  2387. display: '',
  2388. null: true,
  2389. name: 'group_ids',
  2390. tag: 'select',
  2391. multiple: true,
  2392. nulloption: true,
  2393. relation: 'Group',
  2394. },
  2395. ],
  2396. },
  2397. state: '',
  2398. preferences: {
  2399. authentication: true,
  2400. permission: ['admin.channel_web'],
  2401. },
  2402. frontend: true
  2403. )
  2404. Setting.create_if_not_exists(
  2405. title: __('Tab behaviour after ticket action'),
  2406. name: 'ticket_secondary_action',
  2407. area: 'CustomerWeb::Base',
  2408. description: __('Defines the tab behaviour after a ticket action.'),
  2409. options: {
  2410. form: [
  2411. {
  2412. display: '',
  2413. null: true,
  2414. name: 'ticket_secondary_action',
  2415. tag: 'boolean',
  2416. options: {
  2417. 'closeTab' => __('Close tab'),
  2418. 'closeTabOnTicketClose' => __('Close tab on ticket close'),
  2419. 'closeNextInOverview' => __('Next in overview'),
  2420. 'stayOnTab' => __('Stay on tab'),
  2421. },
  2422. },
  2423. ],
  2424. },
  2425. state: 'stayOnTab',
  2426. preferences: {
  2427. authentication: true,
  2428. permission: ['admin.channel_web'],
  2429. },
  2430. frontend: true
  2431. )
  2432. Setting.create_if_not_exists(
  2433. title: __('Enable Ticket creation'),
  2434. name: 'form_ticket_create',
  2435. area: 'Form::Base',
  2436. description: __('Defines if tickets can be created via web form.'),
  2437. options: {
  2438. form: [
  2439. {
  2440. display: '',
  2441. null: true,
  2442. name: 'form_ticket_create',
  2443. tag: 'boolean',
  2444. options: {
  2445. true => 'yes',
  2446. false => 'no',
  2447. },
  2448. },
  2449. ],
  2450. },
  2451. state: false,
  2452. preferences: {
  2453. permission: ['admin.channel_formular'],
  2454. },
  2455. frontend: false,
  2456. )
  2457. group = Group.where(active: true).first
  2458. if !group
  2459. group = Group.first
  2460. end
  2461. group_id = 1
  2462. if group
  2463. group_id = group.id
  2464. end
  2465. Setting.create_if_not_exists(
  2466. title: __('Group selection for ticket creation'),
  2467. name: 'form_ticket_create_group_id',
  2468. area: 'Form::Base',
  2469. description: __('Defines the group of tickets created via web form.'),
  2470. options: {
  2471. form: [
  2472. {
  2473. display: '',
  2474. null: true,
  2475. name: 'form_ticket_create_group_id',
  2476. tag: 'select',
  2477. relation: 'Group',
  2478. },
  2479. ],
  2480. },
  2481. state: group_id,
  2482. preferences: {
  2483. permission: ['admin.channel_formular'],
  2484. },
  2485. frontend: false,
  2486. )
  2487. Setting.create_if_not_exists(
  2488. title: __('Limit tickets by IP per hour'),
  2489. name: 'form_ticket_create_by_ip_per_hour',
  2490. area: 'Form::Base',
  2491. description: __('Defines a limit for how many tickets can be created via web form from one IP address per hour.'),
  2492. options: {
  2493. form: [
  2494. {
  2495. display: '',
  2496. null: true,
  2497. name: 'form_ticket_create_by_ip_per_hour',
  2498. tag: 'input',
  2499. },
  2500. ],
  2501. },
  2502. state: 20,
  2503. preferences: {
  2504. permission: ['admin.channel_formular'],
  2505. },
  2506. frontend: false,
  2507. )
  2508. Setting.create_if_not_exists(
  2509. title: __('Limit tickets by IP per day'),
  2510. name: 'form_ticket_create_by_ip_per_day',
  2511. area: 'Form::Base',
  2512. description: __('Defines a limit for how many tickets can be created via web form from one IP address per day.'),
  2513. options: {
  2514. form: [
  2515. {
  2516. display: '',
  2517. null: true,
  2518. name: 'form_ticket_create_by_ip_per_day',
  2519. tag: 'input',
  2520. },
  2521. ],
  2522. },
  2523. state: 240,
  2524. preferences: {
  2525. permission: ['admin.channel_formular'],
  2526. },
  2527. frontend: false,
  2528. )
  2529. Setting.create_if_not_exists(
  2530. title: __('Limit tickets per day'),
  2531. name: 'form_ticket_create_per_day',
  2532. area: 'Form::Base',
  2533. description: __('Defines a limit for how many tickets can be created via web form per day.'),
  2534. options: {
  2535. form: [
  2536. {
  2537. display: '',
  2538. null: true,
  2539. name: 'form_ticket_create_per_day',
  2540. tag: 'input',
  2541. },
  2542. ],
  2543. },
  2544. state: 5000,
  2545. preferences: {
  2546. permission: ['admin.channel_formular'],
  2547. },
  2548. frontend: false,
  2549. )
  2550. Setting.create_if_not_exists(
  2551. title: __('Ticket Subject Size'),
  2552. name: 'ticket_subject_size',
  2553. area: 'Email::Base',
  2554. description: __('Max. length of the subject in an email reply.'),
  2555. options: {
  2556. form: [
  2557. {
  2558. display: '',
  2559. null: false,
  2560. name: 'ticket_subject_size',
  2561. tag: 'input',
  2562. },
  2563. ],
  2564. },
  2565. state: '110',
  2566. preferences: {
  2567. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2568. },
  2569. frontend: false
  2570. )
  2571. Setting.create_if_not_exists(
  2572. title: __('Ticket Subject Reply'),
  2573. name: 'ticket_subject_re',
  2574. area: 'Email::Base',
  2575. description: __('The text at the beginning of the subject in an email reply, e.g. RE, AW, or AS.'),
  2576. options: {
  2577. form: [
  2578. {
  2579. display: '',
  2580. null: true,
  2581. name: 'ticket_subject_re',
  2582. tag: 'input',
  2583. },
  2584. ],
  2585. },
  2586. state: 'RE',
  2587. preferences: {
  2588. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2589. },
  2590. frontend: false
  2591. )
  2592. Setting.create_if_not_exists(
  2593. title: __('Ticket Subject Forward'),
  2594. name: 'ticket_subject_fwd',
  2595. area: 'Email::Base',
  2596. description: __('The text at the beginning of the subject in an email forward, e. g. FWD.'),
  2597. options: {
  2598. form: [
  2599. {
  2600. display: '',
  2601. null: true,
  2602. name: 'ticket_subject_fwd',
  2603. tag: 'input',
  2604. },
  2605. ],
  2606. },
  2607. state: 'FWD',
  2608. preferences: {
  2609. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2610. },
  2611. frontend: false
  2612. )
  2613. Setting.create_if_not_exists(
  2614. title: __('Sender Format'),
  2615. name: 'ticket_define_email_from',
  2616. area: 'Email::Base',
  2617. description: __('Defines how the From field of emails (sent from answers and email tickets) should look like.'),
  2618. options: {
  2619. form: [
  2620. {
  2621. display: '',
  2622. null: true,
  2623. name: 'ticket_define_email_from',
  2624. tag: 'select',
  2625. options: {
  2626. SystemAddressName: __('System Address Display Name'),
  2627. AgentNameSystemAddressName: __('Agent Name + FromSeparator + System Address Display Name'),
  2628. AgentName: __('Agent Name'),
  2629. },
  2630. translate: true,
  2631. },
  2632. ],
  2633. },
  2634. state: 'AgentNameSystemAddressName',
  2635. preferences: {
  2636. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2637. },
  2638. frontend: false
  2639. )
  2640. Setting.create_if_not_exists(
  2641. title: __('Sender Format Separator'),
  2642. name: 'ticket_define_email_from_separator',
  2643. area: 'Email::Base',
  2644. description: __('Defines the separator between the agent\'s real name and the given group email address.'),
  2645. options: {
  2646. form: [
  2647. {
  2648. display: '',
  2649. null: false,
  2650. name: 'ticket_define_email_from_separator',
  2651. tag: 'input',
  2652. },
  2653. ],
  2654. },
  2655. state: 'via',
  2656. preferences: {
  2657. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2658. },
  2659. frontend: false
  2660. )
  2661. Setting.create_if_not_exists(
  2662. title: __('Maximum Email Size'),
  2663. name: 'postmaster_max_size',
  2664. area: 'Email::Base',
  2665. description: __('Defines the maximum accepted email size in MB.'),
  2666. options: {
  2667. form: [
  2668. {
  2669. display: '',
  2670. null: true,
  2671. name: 'postmaster_max_size',
  2672. tag: 'select',
  2673. options: {
  2674. 1 => ' 1',
  2675. 2 => ' 2',
  2676. 3 => ' 3',
  2677. 4 => ' 4',
  2678. 5 => ' 5',
  2679. 6 => ' 6',
  2680. 7 => ' 7',
  2681. 8 => ' 8',
  2682. 9 => ' 9',
  2683. 10 => ' 10',
  2684. 15 => ' 15',
  2685. 20 => ' 20',
  2686. 25 => ' 25',
  2687. 30 => ' 30',
  2688. 35 => ' 35',
  2689. 40 => ' 40',
  2690. 45 => ' 45',
  2691. 50 => ' 50',
  2692. 60 => ' 60',
  2693. 70 => ' 70',
  2694. 80 => ' 80',
  2695. 90 => ' 90',
  2696. 100 => '100',
  2697. 125 => '125',
  2698. 150 => '150',
  2699. },
  2700. },
  2701. ],
  2702. },
  2703. state: 10,
  2704. preferences: {
  2705. online_service_disable: true,
  2706. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2707. },
  2708. frontend: false
  2709. )
  2710. Setting.create_if_not_exists(
  2711. title: __('Additional follow-up detection'),
  2712. name: 'postmaster_follow_up_search_in',
  2713. area: 'Email::Base',
  2714. 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.'),
  2715. options: {
  2716. form: [
  2717. {
  2718. display: '',
  2719. null: true,
  2720. name: 'postmaster_follow_up_search_in',
  2721. tag: 'checkbox',
  2722. options: {
  2723. 'references' => __('References - Search for follow-up also in In-Reply-To or References headers.'),
  2724. 'body' => __('Body - Search for follow-up also in mail body.'),
  2725. 'attachment' => __('Attachment - Search for follow-up also in attachments.'),
  2726. },
  2727. translate: true,
  2728. },
  2729. ],
  2730. },
  2731. state: [],
  2732. preferences: {
  2733. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2734. },
  2735. frontend: false
  2736. )
  2737. Setting.create_if_not_exists(
  2738. title: __('Sender based on Reply-To header'),
  2739. name: 'postmaster_sender_based_on_reply_to',
  2740. area: 'Email::Base',
  2741. 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.'),
  2742. options: {
  2743. form: [
  2744. {
  2745. display: '',
  2746. null: true,
  2747. name: 'postmaster_sender_based_on_reply_to',
  2748. tag: 'select',
  2749. options: {
  2750. '' => '-',
  2751. 'as_sender_of_email' => __('Take Reply-To header as sender/from of email.'),
  2752. 'as_sender_of_email_use_from_realname' => __('Take Reply-To header as sender/from of email and use the real name of origin from.'),
  2753. },
  2754. translate: true,
  2755. },
  2756. ],
  2757. },
  2758. state: [],
  2759. preferences: {
  2760. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2761. },
  2762. frontend: false
  2763. )
  2764. Setting.create_if_not_exists(
  2765. title: __('Customer selection based on sender and receiver list'),
  2766. name: 'postmaster_sender_is_agent_search_for_customer',
  2767. area: 'Email::Base',
  2768. description: __('If the sender is an agent, set the first user in the recipient list as the customer.'),
  2769. options: {
  2770. form: [
  2771. {
  2772. display: '',
  2773. null: true,
  2774. name: 'postmaster_sender_is_agent_search_for_customer',
  2775. tag: 'boolean',
  2776. options: {
  2777. true => 'yes',
  2778. false => 'no',
  2779. },
  2780. },
  2781. ],
  2782. },
  2783. state: true,
  2784. preferences: {
  2785. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2786. },
  2787. frontend: false
  2788. )
  2789. Setting.create_if_not_exists(
  2790. title: __('Send postmaster mail if mail too large'),
  2791. name: 'postmaster_send_reject_if_mail_too_large',
  2792. area: 'Email::Base',
  2793. description: __('Send postmaster reject mail to sender of mail if mail is too large.'),
  2794. options: {
  2795. form: [
  2796. {
  2797. display: '',
  2798. null: true,
  2799. name: 'postmaster_send_reject_if_mail_too_large',
  2800. tag: 'boolean',
  2801. options: {
  2802. true => 'yes',
  2803. false => 'no',
  2804. },
  2805. },
  2806. ],
  2807. },
  2808. state: true,
  2809. preferences: {
  2810. online_service_disable: true,
  2811. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2812. },
  2813. frontend: false
  2814. )
  2815. Setting.create_if_not_exists(
  2816. title: __('Notification Sender'),
  2817. name: 'notification_sender',
  2818. area: 'Email::Base',
  2819. description: __('Defines the sender of email notifications.'),
  2820. options: {
  2821. form: [
  2822. {
  2823. display: '',
  2824. null: false,
  2825. name: 'notification_sender',
  2826. tag: 'input',
  2827. },
  2828. ],
  2829. },
  2830. state: '#{config.product_name} <noreply@#{config.fqdn}>', # rubocop:disable Lint/InterpolationCheck
  2831. preferences: {
  2832. online_service_disable: true,
  2833. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2834. },
  2835. frontend: false
  2836. )
  2837. Setting.create_if_not_exists(
  2838. title: __('Block Notifications'),
  2839. name: 'send_no_auto_response_reg_exp',
  2840. area: 'Email::Base',
  2841. description: __('If this regex matches, no notification will be sent by the sender.'),
  2842. options: {
  2843. form: [
  2844. {
  2845. display: '',
  2846. null: false,
  2847. name: 'send_no_auto_response_reg_exp',
  2848. tag: 'input',
  2849. },
  2850. ],
  2851. },
  2852. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?',
  2853. preferences: {
  2854. online_service_disable: true,
  2855. permission: ['admin.channel_email', 'admin.channel_google', 'admin.channel_microsoft365'],
  2856. },
  2857. frontend: false
  2858. )
  2859. Setting.create_if_not_exists(
  2860. title: __('BCC address for all outgoing emails'),
  2861. name: 'system_bcc',
  2862. area: 'Email::Enhanced',
  2863. description: __('To archive all outgoing emails from Zammad to external, you can store a BCC email address here.'),
  2864. options: {},
  2865. state: '',
  2866. preferences: { online_service_disable: true },
  2867. frontend: false
  2868. )
  2869. Setting.create_if_not_exists(
  2870. title: __('API Token Access'),
  2871. name: 'api_token_access',
  2872. area: 'API::Base',
  2873. description: __('Enable REST API using tokens (not username/email address and password). Each user needs to create its own access tokens in user profile.'),
  2874. options: {
  2875. form: [
  2876. {
  2877. display: '',
  2878. null: true,
  2879. name: 'api_token_access',
  2880. tag: 'boolean',
  2881. options: {
  2882. true => 'yes',
  2883. false => 'no',
  2884. },
  2885. },
  2886. ],
  2887. },
  2888. state: true,
  2889. preferences: {
  2890. permission: ['admin.api'],
  2891. },
  2892. frontend: true
  2893. )
  2894. Setting.create_if_not_exists(
  2895. title: __('API Password Access'),
  2896. name: 'api_password_access',
  2897. area: 'API::Base',
  2898. description: __('Enable REST API access using the username/email address and password for the authentication user.'),
  2899. options: {
  2900. form: [
  2901. {
  2902. display: '',
  2903. null: true,
  2904. name: 'api_password_access',
  2905. tag: 'boolean',
  2906. options: {
  2907. true => 'yes',
  2908. false => 'no',
  2909. },
  2910. },
  2911. ],
  2912. },
  2913. state: true,
  2914. preferences: {
  2915. permission: ['admin.api'],
  2916. },
  2917. frontend: false
  2918. )
  2919. Setting.create_if_not_exists(
  2920. title: __('Monitoring Token'),
  2921. name: 'monitoring_token',
  2922. area: 'HealthCheck::Base',
  2923. description: __('Token for monitoring.'),
  2924. options: {
  2925. form: [
  2926. {
  2927. display: '',
  2928. null: false,
  2929. name: 'monitoring_token',
  2930. tag: 'input',
  2931. },
  2932. ],
  2933. },
  2934. state: ENV['MONITORING_TOKEN'] || SecureRandom.urlsafe_base64(40),
  2935. preferences: {
  2936. permission: ['admin.monitoring'],
  2937. },
  2938. frontend: false
  2939. )
  2940. Setting.create_if_not_exists(
  2941. title: __('Enable Chat'),
  2942. name: 'chat',
  2943. area: 'Chat::Base',
  2944. description: __('Enable/disable online chat.'),
  2945. options: {
  2946. form: [
  2947. {
  2948. display: '',
  2949. null: true,
  2950. name: 'chat',
  2951. tag: 'boolean',
  2952. options: {
  2953. true => 'yes',
  2954. false => 'no',
  2955. },
  2956. },
  2957. ],
  2958. },
  2959. preferences: {
  2960. trigger: ['menu:render', 'chat:rerender'],
  2961. permission: ['admin.channel_chat'],
  2962. },
  2963. state: false,
  2964. frontend: true
  2965. )
  2966. Setting.create_if_not_exists(
  2967. title: __('Agent idle timeout'),
  2968. name: 'chat_agent_idle_timeout',
  2969. area: 'Chat::Extended',
  2970. description: __('Idle timeout in seconds until agent is set offline automatically.'),
  2971. options: {
  2972. form: [
  2973. {
  2974. display: '',
  2975. null: false,
  2976. name: 'chat_agent_idle_timeout',
  2977. tag: 'input',
  2978. },
  2979. ],
  2980. },
  2981. state: '120',
  2982. preferences: {
  2983. permission: ['admin.channel_chat'],
  2984. },
  2985. frontend: true
  2986. )
  2987. Setting.create_if_not_exists(
  2988. title: __('Defines searchable models.'),
  2989. name: 'models_searchable',
  2990. area: 'Models::Base',
  2991. description: __('Defines the searchable models.'),
  2992. options: {},
  2993. state: Models.searchable.map(&:to_s),
  2994. preferences: {
  2995. authentication: true,
  2996. },
  2997. frontend: true,
  2998. )
  2999. Setting.create_if_not_exists(
  3000. title: __('Default Screen'),
  3001. name: 'default_controller',
  3002. area: 'Core',
  3003. description: __('Defines the default screen.'),
  3004. options: {},
  3005. state: '#dashboard',
  3006. frontend: true
  3007. )
  3008. Setting.create_if_not_exists(
  3009. title: __('Elasticsearch Endpoint URL'),
  3010. name: 'es_url',
  3011. area: 'SearchIndex::Elasticsearch',
  3012. description: __('Defines endpoint of Elasticsearch.'),
  3013. state: '',
  3014. preferences: { online_service_disable: true },
  3015. frontend: false
  3016. )
  3017. Setting.create_if_not_exists(
  3018. title: __('Elasticsearch Endpoint User'),
  3019. name: 'es_user',
  3020. area: 'SearchIndex::Elasticsearch',
  3021. description: __('Defines HTTP basic auth user of Elasticsearch.'),
  3022. state: '',
  3023. preferences: { online_service_disable: true },
  3024. frontend: false
  3025. )
  3026. Setting.create_if_not_exists(
  3027. title: __('Elasticsearch Endpoint Password'),
  3028. name: 'es_password',
  3029. area: 'SearchIndex::Elasticsearch',
  3030. description: __('Defines HTTP basic auth password of Elasticsearch.'),
  3031. state: '',
  3032. preferences: { online_service_disable: true },
  3033. frontend: false
  3034. )
  3035. Setting.create_if_not_exists(
  3036. title: __('Elasticsearch Endpoint Index'),
  3037. name: 'es_index',
  3038. area: 'SearchIndex::Elasticsearch',
  3039. description: __('Defines Elasticsearch index name.'),
  3040. state: 'zammad',
  3041. preferences: { online_service_disable: true },
  3042. frontend: false
  3043. )
  3044. Setting.create_if_not_exists(
  3045. title: __('Elasticsearch Attachment Extensions'),
  3046. name: 'es_attachment_ignore',
  3047. area: 'SearchIndex::Elasticsearch',
  3048. description: __('Defines attachment extensions which will be ignored by Elasticsearch.'),
  3049. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  3050. preferences: { online_service_disable: true },
  3051. frontend: false
  3052. )
  3053. Setting.create_if_not_exists(
  3054. title: __('Elasticsearch Attachment Size'),
  3055. name: 'es_attachment_max_size_in_mb',
  3056. area: 'SearchIndex::Elasticsearch',
  3057. description: __('Define max. attachment size for Elasticsearch.'),
  3058. state: 10,
  3059. preferences: { online_service_disable: true },
  3060. frontend: false
  3061. )
  3062. Setting.create_if_not_exists(
  3063. title: __('Elasticsearch Total Payload Size'),
  3064. name: 'es_total_max_size_in_mb',
  3065. area: 'SearchIndex::Elasticsearch',
  3066. description: __('Define max. payload size for Elasticsearch.'),
  3067. state: 300,
  3068. preferences: { online_service_disable: true },
  3069. frontend: false
  3070. )
  3071. Setting.create_if_not_exists(
  3072. title: __('Elasticsearch Pipeline Name'),
  3073. name: 'es_pipeline',
  3074. area: 'SearchIndex::Elasticsearch',
  3075. description: __('Define pipeline name for Elasticsearch.'),
  3076. state: '',
  3077. preferences: { online_service_disable: true },
  3078. frontend: false
  3079. )
  3080. Setting.create_if_not_exists(
  3081. title: __('Elasticsearch Excludes'),
  3082. name: 'es_excludes',
  3083. area: 'SearchIndex::Elasticsearch',
  3084. description: __('Defines if the search index is using excluded attributes.'),
  3085. state: true,
  3086. preferences: { online_service_disable: true },
  3087. frontend: false
  3088. )
  3089. Setting.create_if_not_exists(
  3090. title: __('Import Mode'),
  3091. name: 'import_mode',
  3092. area: 'Import::Base',
  3093. description: __('Puts Zammad into import mode (disables some triggers).'),
  3094. options: {
  3095. form: [
  3096. {
  3097. display: '',
  3098. null: true,
  3099. name: 'import_mode',
  3100. tag: 'boolean',
  3101. options: {
  3102. true => 'yes',
  3103. false => 'no',
  3104. },
  3105. },
  3106. ],
  3107. },
  3108. state: false,
  3109. frontend: true
  3110. )
  3111. Setting.create_if_not_exists(
  3112. title: __('Import Backend'),
  3113. name: 'import_backend',
  3114. area: 'Import::Base::Internal',
  3115. description: __('Set backend which is being used for import.'),
  3116. options: {},
  3117. state: '',
  3118. frontend: true
  3119. )
  3120. Setting.create_if_not_exists(
  3121. title: __('Ignore Escalation/SLA Information'),
  3122. name: 'import_ignore_sla',
  3123. area: 'Import::Base',
  3124. description: __('Ignore escalation/SLA information for import.'),
  3125. options: {
  3126. form: [
  3127. {
  3128. display: '',
  3129. null: true,
  3130. name: 'import_ignore_sla',
  3131. tag: 'boolean',
  3132. options: {
  3133. true => 'yes',
  3134. false => 'no',
  3135. },
  3136. },
  3137. ],
  3138. },
  3139. state: false,
  3140. frontend: false
  3141. )
  3142. Setting.create_if_not_exists(
  3143. title: __('Import Endpoint'),
  3144. name: 'import_otrs_endpoint',
  3145. area: 'Import::OTRS',
  3146. description: __('Defines an OTRS endpoint to import users, tickets, states, and articles.'),
  3147. options: {
  3148. form: [
  3149. {
  3150. display: '',
  3151. null: false,
  3152. name: 'import_otrs_endpoint',
  3153. tag: 'input',
  3154. },
  3155. ],
  3156. },
  3157. state: 'http://otrs_host/otrs',
  3158. frontend: false
  3159. )
  3160. Setting.create_if_not_exists(
  3161. title: __('Import Key'),
  3162. name: 'import_otrs_endpoint_key',
  3163. area: 'Import::OTRS',
  3164. description: __('Defines OTRS endpoint authentication key.'),
  3165. options: {
  3166. form: [
  3167. {
  3168. display: '',
  3169. null: false,
  3170. name: 'import_otrs_endpoint_key',
  3171. tag: 'input',
  3172. },
  3173. ],
  3174. },
  3175. state: '',
  3176. frontend: false
  3177. )
  3178. Setting.create_if_not_exists(
  3179. title: __('Import User for HTTP basic authentication'),
  3180. name: 'import_otrs_user',
  3181. area: 'Import::OTRS',
  3182. description: __('Defines HTTP basic authentication user (only if OTRS is protected via HTTP basic auth).'),
  3183. options: {
  3184. form: [
  3185. {
  3186. display: '',
  3187. null: true,
  3188. name: 'import_otrs_user',
  3189. tag: 'input',
  3190. },
  3191. ],
  3192. },
  3193. state: '',
  3194. frontend: false
  3195. )
  3196. Setting.create_if_not_exists(
  3197. title: __('Import Password for HTTP basic authentication'),
  3198. name: 'import_otrs_password',
  3199. area: 'Import::OTRS',
  3200. description: __('Defines HTTP basic authentication password (only if OTRS is protected via HTTP basic auth).'),
  3201. options: {
  3202. form: [
  3203. {
  3204. display: '',
  3205. null: true,
  3206. name: 'import_otrs_password',
  3207. tag: 'input',
  3208. },
  3209. ],
  3210. },
  3211. state: '',
  3212. frontend: false
  3213. )
  3214. Setting.create_if_not_exists(
  3215. title: __('Import Endpoint'),
  3216. name: 'import_zendesk_endpoint',
  3217. area: 'Import::Zendesk',
  3218. description: __('Defines a Zendesk endpoint to import users, tickets, states, and articles.'),
  3219. options: {
  3220. form: [
  3221. {
  3222. display: '',
  3223. null: false,
  3224. name: 'import_zendesk_endpoint',
  3225. tag: 'input',
  3226. },
  3227. ],
  3228. },
  3229. state: 'https://yours.zendesk.com/api/v2',
  3230. frontend: false
  3231. )
  3232. Setting.create_if_not_exists(
  3233. title: __('Import API key for requesting the Zendesk API'),
  3234. name: 'import_zendesk_endpoint_key',
  3235. area: 'Import::Zendesk',
  3236. description: __('Defines Zendesk endpoint authentication API key.'),
  3237. options: {
  3238. form: [
  3239. {
  3240. display: '',
  3241. null: false,
  3242. name: 'import_zendesk_endpoint_key',
  3243. tag: 'input',
  3244. },
  3245. ],
  3246. },
  3247. state: '',
  3248. frontend: false
  3249. )
  3250. Setting.create_if_not_exists(
  3251. title: __('Import User for requesting the Zendesk API'),
  3252. name: 'import_zendesk_endpoint_username',
  3253. area: 'Import::Zendesk',
  3254. description: __('Defines Zendesk endpoint authentication user.'),
  3255. options: {
  3256. form: [
  3257. {
  3258. display: '',
  3259. null: true,
  3260. name: 'import_zendesk_endpoint_username',
  3261. tag: 'input',
  3262. },
  3263. ],
  3264. },
  3265. state: '',
  3266. frontend: false
  3267. )
  3268. Setting.create_if_not_exists(
  3269. title: __('Import Endpoint'),
  3270. name: 'import_freshdesk_endpoint',
  3271. area: 'Import::Freshdesk',
  3272. description: __('Defines a Freshdesk endpoint to import users, tickets, states, and articles.'),
  3273. options: {
  3274. form: [
  3275. {
  3276. display: '',
  3277. null: false,
  3278. name: 'import_freshdesk_endpoint',
  3279. tag: 'input',
  3280. },
  3281. ],
  3282. },
  3283. state: 'https://yours.freshdesk.com/api/v2',
  3284. frontend: false
  3285. )
  3286. Setting.create_if_not_exists(
  3287. title: __('Import API key for requesting the Freshdesk API'),
  3288. name: 'import_freshdesk_endpoint_key',
  3289. area: 'Import::Freshdesk',
  3290. description: __('Defines Freshdesk endpoint authentication API key.'),
  3291. options: {
  3292. form: [
  3293. {
  3294. display: '',
  3295. null: false,
  3296. name: 'import_freshdesk_endpoint_key',
  3297. tag: 'input',
  3298. },
  3299. ],
  3300. },
  3301. state: '',
  3302. frontend: false
  3303. )
  3304. Setting.create_if_not_exists(
  3305. title: __('Import Endpoint'),
  3306. name: 'import_kayako_endpoint',
  3307. area: 'Import::Kayako',
  3308. description: __('Defines a Kayako endpoint to import users, tickets, states, and articles.'),
  3309. options: {
  3310. form: [
  3311. {
  3312. display: '',
  3313. null: false,
  3314. name: 'import_kayako_endpoint',
  3315. tag: 'input',
  3316. },
  3317. ],
  3318. },
  3319. state: 'https://yours.kayako.com/api/v1',
  3320. frontend: false
  3321. )
  3322. Setting.create_if_not_exists(
  3323. title: __('Import User for requesting the Kayako API'),
  3324. name: 'import_kayako_endpoint_username',
  3325. area: 'Import::Kayako',
  3326. description: __('Defines Kayako endpoint authentication user.'),
  3327. options: {
  3328. form: [
  3329. {
  3330. display: '',
  3331. null: false,
  3332. name: 'import_kayako_endpoint_username',
  3333. tag: 'input',
  3334. },
  3335. ],
  3336. },
  3337. state: '',
  3338. frontend: false
  3339. )
  3340. Setting.create_if_not_exists(
  3341. title: __('Import Password for requesting the Kayako API'),
  3342. name: 'import_kayako_endpoint_password',
  3343. area: 'Import::Kayako',
  3344. description: __('Defines Kayako endpoint authentication password.'),
  3345. options: {
  3346. form: [
  3347. {
  3348. display: '',
  3349. null: false,
  3350. name: 'import_kayako_endpoint_password',
  3351. tag: 'input',
  3352. },
  3353. ],
  3354. },
  3355. state: '',
  3356. frontend: false
  3357. )
  3358. Setting.create_if_not_exists(
  3359. title: __('Import Backends'),
  3360. name: 'import_backends',
  3361. area: 'Import',
  3362. description: __('A list of active import backends that gets scheduled automatically.'),
  3363. options: {},
  3364. state: ['Import::Ldap', 'Import::Exchange'],
  3365. preferences: {
  3366. permission: ['admin'],
  3367. },
  3368. frontend: false
  3369. )
  3370. Setting.create_if_not_exists(
  3371. title: __('Sequencer log level'),
  3372. name: 'sequencer_log_level',
  3373. area: 'Core',
  3374. description: __('Defines the log levels for various logging actions of the Sequencer.'),
  3375. options: {},
  3376. state: {
  3377. sequence: {
  3378. start_finish: :debug,
  3379. unit: :debug,
  3380. result: :debug,
  3381. },
  3382. state: {
  3383. optional: :debug,
  3384. set: :debug,
  3385. get: :debug,
  3386. attribute_initialization: {
  3387. start_finish: :debug,
  3388. attributes: :debug,
  3389. },
  3390. parameter_initialization: {
  3391. parameters: :debug,
  3392. start_finish: :debug,
  3393. unused: :debug,
  3394. },
  3395. expectations_initialization: :debug,
  3396. cleanup: {
  3397. start_finish: :debug,
  3398. remove: :debug,
  3399. }
  3400. }
  3401. },
  3402. frontend: false,
  3403. )
  3404. Setting.create_if_not_exists(
  3405. title: __('Time Accounting'),
  3406. name: 'time_accounting',
  3407. area: 'Web::Base',
  3408. description: __('Enable time accounting.'),
  3409. options: {
  3410. form: [
  3411. {
  3412. display: '',
  3413. null: true,
  3414. name: 'time_accounting',
  3415. tag: 'boolean',
  3416. options: {
  3417. true => 'yes',
  3418. false => 'no',
  3419. },
  3420. },
  3421. ],
  3422. },
  3423. preferences: {
  3424. authentication: true,
  3425. permission: ['admin.time_accounting'],
  3426. },
  3427. state: false,
  3428. frontend: true
  3429. )
  3430. Setting.create_if_not_exists(
  3431. title: __('Time Accounting Selector'),
  3432. name: 'time_accounting_selector',
  3433. area: 'Web::Base',
  3434. description: __('Enable time accounting for these tickets.'),
  3435. options: {
  3436. form: [
  3437. {},
  3438. ],
  3439. },
  3440. preferences: {
  3441. authentication: true,
  3442. permission: ['admin.time_accounting'],
  3443. },
  3444. state: {},
  3445. frontend: true
  3446. )
  3447. Setting.create_if_not_exists(
  3448. title: __('New Tags'),
  3449. name: 'tag_new',
  3450. area: 'Web::Base',
  3451. description: __('Allow users to create new tags.'),
  3452. options: {
  3453. form: [
  3454. {
  3455. display: '',
  3456. null: true,
  3457. name: 'tag_new',
  3458. tag: 'boolean',
  3459. options: {
  3460. true => 'yes',
  3461. false => 'no',
  3462. },
  3463. },
  3464. ],
  3465. },
  3466. preferences: {
  3467. authentication: true,
  3468. permission: ['admin.tag'],
  3469. },
  3470. state: true,
  3471. frontend: true
  3472. )
  3473. Setting.create_if_not_exists(
  3474. title: __('Default calendar tickets subscriptions'),
  3475. name: 'defaults_calendar_subscriptions_tickets',
  3476. area: 'Defaults::CalendarSubscriptions',
  3477. description: __('Defines the default calendar tickets subscription settings.'),
  3478. options: {},
  3479. state: {
  3480. escalation: {
  3481. own: true,
  3482. not_assigned: false,
  3483. },
  3484. new_open: {
  3485. own: true,
  3486. not_assigned: false,
  3487. },
  3488. pending: {
  3489. own: true,
  3490. not_assigned: false,
  3491. }
  3492. },
  3493. preferences: {
  3494. authentication: true,
  3495. },
  3496. frontend: true
  3497. )
  3498. Setting.create_if_not_exists(
  3499. title: __('Defines postmaster filter.'),
  3500. name: '0005_postmaster_filter_trusted',
  3501. area: 'Postmaster::PreFilter',
  3502. description: __('Defines postmaster filter to remove X-Zammad headers from untrustworthy sources.'),
  3503. options: {},
  3504. state: 'Channel::Filter::Trusted',
  3505. frontend: false
  3506. )
  3507. Setting.create_if_not_exists(
  3508. title: __('Defines postmaster filter.'),
  3509. name: '0006_postmaster_filter_auto_response_check',
  3510. area: 'Postmaster::PreFilter',
  3511. description: __('Defines postmaster filter to identify auto responses to prevent auto replies from Zammad.'),
  3512. options: {},
  3513. state: 'Channel::Filter::AutoResponseCheck',
  3514. frontend: false
  3515. )
  3516. Setting.create_if_not_exists(
  3517. title: __('Defines postmaster filter.'),
  3518. name: '0007_postmaster_filter_follow_up_check',
  3519. area: 'Postmaster::PreFilter',
  3520. description: __('Defines postmaster filter to identify follow-ups (based on admin settings).'),
  3521. options: {},
  3522. state: 'Channel::Filter::FollowUpCheck',
  3523. frontend: false
  3524. )
  3525. Setting.create_if_not_exists(
  3526. title: __('Defines postmaster filter.'),
  3527. name: '0008_postmaster_filter_follow_up_merged',
  3528. area: 'Postmaster::PreFilter',
  3529. description: __('Defines postmaster filter to identify follow-up ticket for merged tickets.'),
  3530. options: {},
  3531. state: 'Channel::Filter::FollowUpMerged',
  3532. frontend: false
  3533. )
  3534. Setting.create_if_not_exists(
  3535. title: __('Defines postmaster filter.'),
  3536. name: '0009_postmaster_filter_follow_up_assignment',
  3537. area: 'Postmaster::PreFilter',
  3538. description: __('Defines postmaster filter to set the owner (based on group follow up assignment).'),
  3539. options: {},
  3540. state: 'Channel::Filter::FollowUpAssignment',
  3541. frontend: false
  3542. )
  3543. Setting.create_if_not_exists(
  3544. title: __('Defines postmaster filter.'),
  3545. name: '0011_postmaster_sender_based_on_reply_to',
  3546. area: 'Postmaster::PreFilter',
  3547. description: __('Defines postmaster filter to set the sender/from of emails based on reply-to header.'),
  3548. options: {},
  3549. state: 'Channel::Filter::ReplyToBasedSender',
  3550. frontend: false
  3551. )
  3552. Setting.create_if_not_exists(
  3553. title: __('Define postmaster filter.'),
  3554. name: '0018_postmaster_import_archive',
  3555. area: 'Postmaster::PreFilter',
  3556. description: __('Define postmaster filter to import archive mailboxes.'),
  3557. options: {},
  3558. state: 'Channel::Filter::ImportArchive',
  3559. frontend: false
  3560. )
  3561. Setting.create_if_not_exists(
  3562. title: __('Defines postmaster filter.'),
  3563. name: '0012_postmaster_filter_sender_is_system_address',
  3564. area: 'Postmaster::PreFilter',
  3565. description: __('Defines postmaster filter to check if email has been created by Zammad itself and will set the article sender.'),
  3566. options: {},
  3567. state: 'Channel::Filter::SenderIsSystemAddress',
  3568. frontend: false
  3569. )
  3570. Setting.create_if_not_exists(
  3571. title: __('Defines postmaster filter.'),
  3572. name: '0014_postmaster_filter_own_notification_loop_detection',
  3573. area: 'Postmaster::PreFilter',
  3574. description: __('Defines postmaster filter to check if the email is a self-created notification email, then ignore it to prevent email loops.'),
  3575. options: {},
  3576. state: 'Channel::Filter::OwnNotificationLoopDetection',
  3577. frontend: false
  3578. )
  3579. Setting.create_if_not_exists(
  3580. title: __('Defines postmaster filter.'),
  3581. name: '0015_postmaster_filter_identify_sender',
  3582. area: 'Postmaster::PreFilter',
  3583. description: __('Defines postmaster filter to identify sender user.'),
  3584. options: {},
  3585. state: 'Channel::Filter::IdentifySender',
  3586. frontend: false
  3587. )
  3588. Setting.create_if_not_exists(
  3589. title: __('Defines postmaster filter.'),
  3590. name: '0016_postmaster_filter_smime',
  3591. area: 'Postmaster::PreFilter',
  3592. description: __('Defines postmaster filter to handle secure mailing.'),
  3593. options: {},
  3594. state: 'Channel::Filter::SecureMailing',
  3595. frontend: false
  3596. )
  3597. Setting.create_if_not_exists(
  3598. title: __('Defines postmaster filter.'),
  3599. name: '0030_postmaster_filter_out_of_office_check',
  3600. area: 'Postmaster::PreFilter',
  3601. description: __('Defines postmaster filter to identify out-of-office emails for follow-up detection and keeping current ticket state.'),
  3602. options: {},
  3603. state: 'Channel::Filter::OutOfOfficeCheck',
  3604. frontend: false
  3605. )
  3606. Setting.create_if_not_exists(
  3607. title: __('Defines postmaster filter.'),
  3608. name: '0200_postmaster_filter_follow_up_possible_check',
  3609. area: 'Postmaster::PreFilter',
  3610. description: __('Define postmaster filter to check if follow-ups get created (based on admin settings).'),
  3611. options: {},
  3612. state: 'Channel::Filter::FollowUpPossibleCheck',
  3613. frontend: false
  3614. )
  3615. Setting.create_if_not_exists(
  3616. title: __('Defines postmaster filter.'),
  3617. name: '0900_postmaster_filter_bounce_follow_up_check',
  3618. area: 'Postmaster::PreFilter',
  3619. description: __('Defines postmaster filter to identify postmaster bounces; and handles them as follow-up of the original tickets'),
  3620. options: {},
  3621. state: 'Channel::Filter::BounceFollowUpCheck',
  3622. frontend: false
  3623. )
  3624. Setting.create_if_not_exists(
  3625. title: __('Defines postmaster filter.'),
  3626. name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
  3627. area: 'Postmaster::PreFilter',
  3628. description: __('Defines postmaster filter to identify postmaster bounces; and disables sending notification if delivery fails permanently.'),
  3629. options: {},
  3630. state: 'Channel::Filter::BounceDeliveryPermanentFailed',
  3631. frontend: false
  3632. )
  3633. Setting.create_if_not_exists(
  3634. title: __('Defines postmaster filter.'),
  3635. name: '0955_postmaster_filter_bounce_delivery_temporary_failed',
  3636. area: 'Postmaster::PreFilter',
  3637. description: __('Defines postmaster filter to identify postmaster bounces; and reopens tickets if delivery fails permanently.'),
  3638. options: {},
  3639. state: 'Channel::Filter::BounceDeliveryTemporaryFailed',
  3640. frontend: false
  3641. )
  3642. Setting.create_if_not_exists(
  3643. title: __('Defines postmaster filter.'),
  3644. name: '1000_postmaster_filter_database_check',
  3645. area: 'Postmaster::PreFilter',
  3646. description: __('Defines postmaster filter for filters managed via admin interface.'),
  3647. options: {},
  3648. state: 'Channel::Filter::Database',
  3649. frontend: false
  3650. )
  3651. Setting.create_if_not_exists(
  3652. title: __('Defines postmaster filter.'),
  3653. name: '5000_postmaster_filter_icinga',
  3654. area: 'Postmaster::PreFilter',
  3655. description: __('Defines postmaster filter to manage Icinga (http://www.icinga.org) emails.'),
  3656. options: {},
  3657. state: 'Channel::Filter::Icinga',
  3658. frontend: false
  3659. )
  3660. Setting.create_if_not_exists(
  3661. title: __('Defines postmaster filter.'),
  3662. name: '5100_postmaster_filter_nagios',
  3663. area: 'Postmaster::PreFilter',
  3664. description: __('Defines postmaster filter to manage Nagios (http://www.nagios.org) emails.'),
  3665. options: {},
  3666. state: 'Channel::Filter::Nagios',
  3667. frontend: false
  3668. )
  3669. Setting.create_if_not_exists(
  3670. title: __('Defines postmaster filter.'),
  3671. name: '5300_postmaster_filter_monit',
  3672. area: 'Postmaster::PreFilter',
  3673. description: __('Defines postmaster filter to manage Monit (https://mmonit.com/monit/) emails.'),
  3674. options: {},
  3675. state: 'Channel::Filter::Monit',
  3676. frontend: false
  3677. )
  3678. Setting.create_if_not_exists(
  3679. title: __('Defines postmaster filter.'),
  3680. name: '5400_postmaster_filter_service_now_check',
  3681. area: 'Postmaster::PreFilter',
  3682. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  3683. options: {},
  3684. state: 'Channel::Filter::ServiceNowCheck',
  3685. frontend: false
  3686. )
  3687. Setting.create_if_not_exists(
  3688. title: __('Defines postmaster filter.'),
  3689. name: '5401_postmaster_filter_service_now_check',
  3690. area: 'Postmaster::PostFilter',
  3691. description: __('Defines postmaster filter to identify ServiceNow mails for correct follow-ups.'),
  3692. options: {},
  3693. state: 'Channel::Filter::ServiceNowCheck',
  3694. frontend: false
  3695. )
  3696. Setting.create_if_not_exists(
  3697. title: __('Defines postmaster filter.'),
  3698. name: '5400_postmaster_filter_jira_check',
  3699. area: 'Postmaster::PreFilter',
  3700. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  3701. options: {},
  3702. state: 'Channel::Filter::JiraCheck',
  3703. frontend: false
  3704. )
  3705. Setting.create_if_not_exists(
  3706. title: __('Defines postmaster filter.'),
  3707. name: '5401_postmaster_filter_jira_check',
  3708. area: 'Postmaster::PostFilter',
  3709. description: __('Defines postmaster filter to identify Jira mails for correct follow-ups.'),
  3710. options: {},
  3711. state: 'Channel::Filter::JiraCheck',
  3712. frontend: false
  3713. )
  3714. Setting.create_if_not_exists(
  3715. title: __('Define postmaster filter.'),
  3716. name: '5500_postmaster_internal_article_check',
  3717. area: 'Postmaster::PreFilter',
  3718. 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.'),
  3719. options: {},
  3720. state: 'Channel::Filter::InternalArticleCheck',
  3721. frontend: false
  3722. )
  3723. Setting.create_if_not_exists(
  3724. title: __('Icinga integration'),
  3725. name: 'icinga_integration',
  3726. area: 'Integration::Switch',
  3727. description: __('Defines if Icinga (http://www.icinga.org) is enabled or not.'),
  3728. options: {
  3729. form: [
  3730. {
  3731. display: '',
  3732. null: true,
  3733. name: 'icinga_integration',
  3734. tag: 'boolean',
  3735. options: {
  3736. true => 'yes',
  3737. false => 'no',
  3738. },
  3739. },
  3740. ],
  3741. },
  3742. state: false,
  3743. preferences: {
  3744. prio: 1,
  3745. permission: ['admin.integration'],
  3746. },
  3747. frontend: false
  3748. )
  3749. Setting.create_if_not_exists(
  3750. title: __('Sender'),
  3751. name: 'icinga_sender',
  3752. area: 'Integration::Icinga',
  3753. description: __('Defines the sender email address of Icinga emails.'),
  3754. options: {
  3755. form: [
  3756. {
  3757. display: '',
  3758. null: false,
  3759. name: 'icinga_sender',
  3760. tag: 'input',
  3761. placeholder: 'icinga@monitoring.example.com',
  3762. },
  3763. ],
  3764. },
  3765. state: 'icinga@monitoring.example.com',
  3766. preferences: {
  3767. prio: 2,
  3768. permission: ['admin.integration'],
  3769. },
  3770. frontend: false,
  3771. )
  3772. Setting.create_if_not_exists(
  3773. title: __('Auto close'),
  3774. name: 'icinga_auto_close',
  3775. area: 'Integration::Icinga',
  3776. description: __('Defines if tickets should be closed if service is recovered.'),
  3777. options: {
  3778. form: [
  3779. {
  3780. display: '',
  3781. null: true,
  3782. name: 'icinga_auto_close',
  3783. tag: 'boolean',
  3784. options: {
  3785. true => 'yes',
  3786. false => 'no',
  3787. },
  3788. },
  3789. ],
  3790. },
  3791. state: true,
  3792. preferences: {
  3793. prio: 3,
  3794. permission: ['admin.integration'],
  3795. },
  3796. frontend: false
  3797. )
  3798. Setting.create_if_not_exists(
  3799. title: __('Auto-close state'),
  3800. name: 'icinga_auto_close_state_id',
  3801. area: 'Integration::Icinga',
  3802. description: __('Defines the state of auto-closed tickets.'),
  3803. options: {
  3804. form: [
  3805. {
  3806. display: '',
  3807. null: false,
  3808. name: 'icinga_auto_close_state_id',
  3809. tag: 'select',
  3810. relation: 'TicketState',
  3811. },
  3812. ],
  3813. },
  3814. state: 4,
  3815. preferences: {
  3816. prio: 4,
  3817. permission: ['admin.integration'],
  3818. },
  3819. frontend: false
  3820. )
  3821. Setting.create_if_not_exists(
  3822. title: __('Nagios integration'),
  3823. name: 'nagios_integration',
  3824. area: 'Integration::Switch',
  3825. description: __('Defines if Nagios (http://www.nagios.org) is enabled or not.'),
  3826. options: {
  3827. form: [
  3828. {
  3829. display: '',
  3830. null: true,
  3831. name: 'nagios_integration',
  3832. tag: 'boolean',
  3833. options: {
  3834. true => 'yes',
  3835. false => 'no',
  3836. },
  3837. },
  3838. ],
  3839. },
  3840. state: false,
  3841. preferences: {
  3842. prio: 1,
  3843. permission: ['admin.integration'],
  3844. },
  3845. frontend: false
  3846. )
  3847. Setting.create_if_not_exists(
  3848. title: __('Sender'),
  3849. name: 'nagios_sender',
  3850. area: 'Integration::Nagios',
  3851. description: __('Defines the sender email address of Nagios emails.'),
  3852. options: {
  3853. form: [
  3854. {
  3855. display: '',
  3856. null: false,
  3857. name: 'nagios_sender',
  3858. tag: 'input',
  3859. placeholder: 'nagios@monitoring.example.com',
  3860. },
  3861. ],
  3862. },
  3863. state: 'nagios@monitoring.example.com',
  3864. preferences: {
  3865. prio: 2,
  3866. permission: ['admin.integration'],
  3867. },
  3868. frontend: false,
  3869. )
  3870. Setting.create_if_not_exists(
  3871. title: __('Auto close'),
  3872. name: 'nagios_auto_close',
  3873. area: 'Integration::Nagios',
  3874. description: __('Defines if tickets should be closed if service is recovered.'),
  3875. options: {
  3876. form: [
  3877. {
  3878. display: '',
  3879. null: true,
  3880. name: 'nagios_auto_close',
  3881. tag: 'boolean',
  3882. options: {
  3883. true => 'yes',
  3884. false => 'no',
  3885. },
  3886. },
  3887. ],
  3888. },
  3889. state: true,
  3890. preferences: {
  3891. prio: 3,
  3892. permission: ['admin.integration'],
  3893. },
  3894. frontend: false
  3895. )
  3896. Setting.create_if_not_exists(
  3897. title: __('Auto-close state'),
  3898. name: 'nagios_auto_close_state_id',
  3899. area: 'Integration::Nagios',
  3900. description: __('Defines the state of auto-closed tickets.'),
  3901. options: {
  3902. form: [
  3903. {
  3904. display: '',
  3905. null: false,
  3906. name: 'nagios_auto_close_state_id',
  3907. tag: 'select',
  3908. relation: 'TicketState',
  3909. },
  3910. ],
  3911. },
  3912. state: 4,
  3913. preferences: {
  3914. prio: 4,
  3915. permission: ['admin.integration'],
  3916. },
  3917. frontend: false
  3918. )
  3919. Setting.create_if_not_exists(
  3920. title: __('Checkmk integration'),
  3921. name: 'check_mk_integration',
  3922. area: 'Integration::Switch',
  3923. description: __('Defines if Checkmk (https://checkmk.com/) is enabled or not.'),
  3924. options: {
  3925. form: [
  3926. {
  3927. display: '',
  3928. null: true,
  3929. name: 'check_mk_integration',
  3930. tag: 'boolean',
  3931. options: {
  3932. true => 'yes',
  3933. false => 'no',
  3934. },
  3935. },
  3936. ],
  3937. },
  3938. state: false,
  3939. preferences: {
  3940. prio: 1,
  3941. permission: ['admin.integration'],
  3942. },
  3943. frontend: false
  3944. )
  3945. Setting.create_if_not_exists(
  3946. title: __('Group'),
  3947. name: 'check_mk_group_id',
  3948. area: 'Integration::CheckMK',
  3949. description: __('Defines the group of created tickets.'),
  3950. options: {
  3951. form: [
  3952. {
  3953. display: '',
  3954. null: false,
  3955. name: 'check_mk_group_id',
  3956. tag: 'select',
  3957. relation: 'Group',
  3958. },
  3959. ],
  3960. },
  3961. state: 1,
  3962. preferences: {
  3963. prio: 2,
  3964. permission: ['admin.integration'],
  3965. },
  3966. frontend: false
  3967. )
  3968. Setting.create_if_not_exists(
  3969. title: __('Auto close'),
  3970. name: 'check_mk_auto_close',
  3971. area: 'Integration::CheckMK',
  3972. description: __('Defines if tickets should be closed if service is recovered.'),
  3973. options: {
  3974. form: [
  3975. {
  3976. display: '',
  3977. null: true,
  3978. name: 'check_mk_auto_close',
  3979. tag: 'boolean',
  3980. options: {
  3981. true => 'yes',
  3982. false => 'no',
  3983. },
  3984. },
  3985. ],
  3986. },
  3987. state: true,
  3988. preferences: {
  3989. prio: 3,
  3990. permission: ['admin.integration'],
  3991. },
  3992. frontend: false
  3993. )
  3994. Setting.create_if_not_exists(
  3995. title: __('Auto-close state'),
  3996. name: 'check_mk_auto_close_state_id',
  3997. area: 'Integration::CheckMK',
  3998. description: __('Defines the state of auto-closed tickets.'),
  3999. options: {
  4000. form: [
  4001. {
  4002. display: '',
  4003. null: false,
  4004. name: 'check_mk_auto_close_state_id',
  4005. tag: 'select',
  4006. relation: 'TicketState',
  4007. },
  4008. ],
  4009. },
  4010. state: 4,
  4011. preferences: {
  4012. prio: 4,
  4013. permission: ['admin.integration'],
  4014. },
  4015. frontend: false
  4016. )
  4017. Setting.create_if_not_exists(
  4018. title: __('Checkmk token'),
  4019. name: 'check_mk_token',
  4020. area: 'Core',
  4021. description: __('Defines the Checkmk token for allowing updates.'),
  4022. options: {},
  4023. state: ENV['CHECK_MK_TOKEN'] || SecureRandom.hex(16),
  4024. preferences: {
  4025. permission: ['admin.integration'],
  4026. },
  4027. frontend: false
  4028. )
  4029. Setting.create_if_not_exists(
  4030. title: __('Monit integration'),
  4031. name: 'monit_integration',
  4032. area: 'Integration::Switch',
  4033. description: __('Defines if Monit (https://mmonit.com/monit/) is enabled or not.'),
  4034. options: {
  4035. form: [
  4036. {
  4037. display: '',
  4038. null: true,
  4039. name: 'monit_integration',
  4040. tag: 'boolean',
  4041. options: {
  4042. true => 'yes',
  4043. false => 'no',
  4044. },
  4045. },
  4046. ],
  4047. },
  4048. state: false,
  4049. preferences: {
  4050. prio: 1,
  4051. permission: ['admin.integration'],
  4052. },
  4053. frontend: false
  4054. )
  4055. Setting.create_if_not_exists(
  4056. title: __('Sender'),
  4057. name: 'monit_sender',
  4058. area: 'Integration::Monit',
  4059. description: __('Defines the sender email address of the service emails.'),
  4060. options: {
  4061. form: [
  4062. {
  4063. display: '',
  4064. null: false,
  4065. name: 'monit_sender',
  4066. tag: 'input',
  4067. placeholder: 'monit@monitoring.example.com',
  4068. },
  4069. ],
  4070. },
  4071. state: 'monit@monitoring.example.com',
  4072. preferences: {
  4073. prio: 2,
  4074. permission: ['admin.integration'],
  4075. },
  4076. frontend: false,
  4077. )
  4078. Setting.create_if_not_exists(
  4079. title: __('Auto close'),
  4080. name: 'monit_auto_close',
  4081. area: 'Integration::Monit',
  4082. description: __('Defines if tickets should be closed if service is recovered.'),
  4083. options: {
  4084. form: [
  4085. {
  4086. display: '',
  4087. null: true,
  4088. name: 'monit_auto_close',
  4089. tag: 'boolean',
  4090. options: {
  4091. true => 'yes',
  4092. false => 'no',
  4093. },
  4094. translate: true,
  4095. },
  4096. ],
  4097. },
  4098. state: true,
  4099. preferences: {
  4100. prio: 3,
  4101. permission: ['admin.integration'],
  4102. },
  4103. frontend: false
  4104. )
  4105. Setting.create_if_not_exists(
  4106. title: __('Auto-close state'),
  4107. name: 'monit_auto_close_state_id',
  4108. area: 'Integration::Monit',
  4109. description: __('Defines the state of auto-closed tickets.'),
  4110. options: {
  4111. form: [
  4112. {
  4113. display: '',
  4114. null: false,
  4115. name: 'monit_auto_close_state_id',
  4116. tag: 'select',
  4117. relation: 'TicketState',
  4118. translate: true,
  4119. },
  4120. ],
  4121. },
  4122. state: 4,
  4123. preferences: {
  4124. prio: 4,
  4125. permission: ['admin.integration'],
  4126. },
  4127. frontend: false
  4128. )
  4129. Setting.create_if_not_exists(
  4130. title: __('LDAP integration'),
  4131. name: 'ldap_integration',
  4132. area: 'Integration::Switch',
  4133. description: __('Defines if LDAP is enabled or not.'),
  4134. options: {
  4135. form: [
  4136. {
  4137. display: '',
  4138. null: true,
  4139. name: 'ldap_integration',
  4140. tag: 'boolean',
  4141. options: {
  4142. true => 'yes',
  4143. false => 'no',
  4144. },
  4145. },
  4146. ],
  4147. },
  4148. state: false,
  4149. preferences: {
  4150. prio: 1,
  4151. authentication: true,
  4152. permission: ['admin.integration'],
  4153. },
  4154. frontend: true
  4155. )
  4156. Setting.create_if_not_exists(
  4157. title: __('Exchange config'),
  4158. name: 'exchange_config',
  4159. area: 'Integration::Exchange',
  4160. description: __('Defines the Exchange config.'),
  4161. options: {},
  4162. state: {},
  4163. preferences: {
  4164. prio: 2,
  4165. permission: ['admin.integration'],
  4166. },
  4167. frontend: false,
  4168. )
  4169. Setting.create_if_not_exists(
  4170. title: __('Exchange integration'),
  4171. name: 'exchange_integration',
  4172. area: 'Integration::Switch',
  4173. description: __('Defines if Exchange is enabled or not.'),
  4174. options: {
  4175. form: [
  4176. {
  4177. display: '',
  4178. null: true,
  4179. name: 'exchange_integration',
  4180. tag: 'boolean',
  4181. options: {
  4182. true => 'yes',
  4183. false => 'no',
  4184. },
  4185. },
  4186. ],
  4187. },
  4188. state: false,
  4189. preferences: {
  4190. prio: 1,
  4191. authentication: true,
  4192. permission: ['admin.integration'],
  4193. },
  4194. frontend: true
  4195. )
  4196. Setting.create_if_not_exists(
  4197. title: __('i-doit integration'),
  4198. name: 'idoit_integration',
  4199. area: 'Integration::Switch',
  4200. description: __('Defines if the i-doit (https://www.i-doit.org/) integration is enabled or not.'),
  4201. options: {
  4202. form: [
  4203. {
  4204. display: '',
  4205. null: true,
  4206. name: 'idoit_integration',
  4207. tag: 'boolean',
  4208. options: {
  4209. true => 'yes',
  4210. false => 'no',
  4211. },
  4212. },
  4213. ],
  4214. },
  4215. state: false,
  4216. preferences: {
  4217. prio: 1,
  4218. authentication: true,
  4219. permission: ['admin.integration'],
  4220. },
  4221. frontend: true
  4222. )
  4223. Setting.create_if_not_exists(
  4224. title: __('i-doit config'),
  4225. name: 'idoit_config',
  4226. area: 'Integration::Idoit',
  4227. description: __('Defines the i-doit config.'),
  4228. options: {},
  4229. state: {},
  4230. preferences: {
  4231. prio: 2,
  4232. permission: ['admin.integration'],
  4233. },
  4234. frontend: false,
  4235. )
  4236. Setting.create_if_not_exists(
  4237. title: __('GitLab integration'),
  4238. name: 'gitlab_integration',
  4239. area: 'Integration::Switch',
  4240. description: __('Defines if the GitLab (http://www.gitlab.com) integration is enabled or not.'),
  4241. options: {
  4242. form: [
  4243. {
  4244. display: '',
  4245. null: true,
  4246. name: 'gitlab_integration',
  4247. tag: 'boolean',
  4248. options: {
  4249. true => 'yes',
  4250. false => 'no',
  4251. },
  4252. },
  4253. ],
  4254. },
  4255. state: false,
  4256. preferences: {
  4257. prio: 1,
  4258. authentication: true,
  4259. permission: ['admin.integration'],
  4260. },
  4261. frontend: true
  4262. )
  4263. Setting.create_if_not_exists(
  4264. title: __('GitLab config'),
  4265. name: 'gitlab_config',
  4266. area: 'Integration::GitLab',
  4267. description: __('Stores the GitLab configuration.'),
  4268. options: {},
  4269. state: {
  4270. endpoint: 'https://gitlab.com/api/graphql',
  4271. },
  4272. preferences: {
  4273. prio: 2,
  4274. permission: ['admin.integration'],
  4275. },
  4276. frontend: false,
  4277. )
  4278. Setting.create_if_not_exists(
  4279. title: __('GitHub integration'),
  4280. name: 'github_integration',
  4281. area: 'Integration::Switch',
  4282. description: __('Defines if the GitHub (http://www.github.com) integration is enabled or not.'),
  4283. options: {
  4284. form: [
  4285. {
  4286. display: '',
  4287. null: true,
  4288. name: 'github_integration',
  4289. tag: 'boolean',
  4290. options: {
  4291. true => 'yes',
  4292. false => 'no',
  4293. },
  4294. },
  4295. ],
  4296. },
  4297. state: false,
  4298. preferences: {
  4299. prio: 1,
  4300. authentication: true,
  4301. permission: ['admin.integration'],
  4302. },
  4303. frontend: true
  4304. )
  4305. Setting.create_if_not_exists(
  4306. title: __('GitHub config'),
  4307. name: 'github_config',
  4308. area: 'Integration::GitHub',
  4309. description: __('Stores the GitHub configuration.'),
  4310. options: {},
  4311. state: {
  4312. endpoint: 'https://api.github.com/graphql',
  4313. },
  4314. preferences: {
  4315. prio: 2,
  4316. permission: ['admin.integration'],
  4317. },
  4318. frontend: false,
  4319. )
  4320. Setting.create_if_not_exists(
  4321. title: __('Defines sync transaction backend.'),
  4322. name: '0100_trigger',
  4323. area: 'Transaction::Backend::Sync',
  4324. description: __('Defines the transaction backend to execute triggers.'),
  4325. options: {},
  4326. state: 'Transaction::Trigger',
  4327. frontend: false
  4328. )
  4329. Setting.create_if_not_exists(
  4330. title: __('Defines transaction backend.'),
  4331. name: '0100_notification',
  4332. area: 'Transaction::Backend::Async',
  4333. description: __('Defines the transaction backend to send agent notifications.'),
  4334. options: {},
  4335. state: 'Transaction::Notification',
  4336. frontend: false
  4337. )
  4338. Setting.create_if_not_exists(
  4339. title: __('Defines transaction backend.'),
  4340. name: '1000_signature_detection',
  4341. area: 'Transaction::Backend::Async',
  4342. description: __('Defines the transaction backend to detect customer signatures in emails.'),
  4343. options: {},
  4344. state: 'Transaction::SignatureDetection',
  4345. frontend: false
  4346. )
  4347. Setting.create_if_not_exists(
  4348. title: __('Defines transaction backend.'),
  4349. name: '6000_slack_webhook',
  4350. area: 'Transaction::Backend::Async',
  4351. description: __('Defines the transaction backend which posts messages to Slack (http://www.slack.com).'),
  4352. options: {},
  4353. state: 'Transaction::Slack',
  4354. frontend: false
  4355. )
  4356. Setting.create_if_not_exists(
  4357. title: __('Slack integration'),
  4358. name: 'slack_integration',
  4359. area: 'Integration::Switch',
  4360. description: __('Defines if Slack (http://www.slack.org) is enabled or not.'),
  4361. options: {
  4362. form: [
  4363. {
  4364. display: '',
  4365. null: true,
  4366. name: 'slack_integration',
  4367. tag: 'boolean',
  4368. options: {
  4369. true => 'yes',
  4370. false => 'no',
  4371. },
  4372. },
  4373. ],
  4374. },
  4375. state: false,
  4376. preferences: {
  4377. prio: 1,
  4378. permission: ['admin.integration'],
  4379. },
  4380. frontend: false
  4381. )
  4382. Setting.create_if_not_exists(
  4383. title: __('Slack config'),
  4384. name: 'slack_config',
  4385. area: 'Integration::Slack',
  4386. description: __('Defines the Slack config.'),
  4387. options: {},
  4388. state: {
  4389. items: []
  4390. },
  4391. preferences: {
  4392. prio: 2,
  4393. permission: ['admin.integration'],
  4394. },
  4395. frontend: false,
  4396. )
  4397. Setting.create_if_not_exists(
  4398. title: __('sipgate.io integration'),
  4399. name: 'sipgate_integration',
  4400. area: 'Integration::Switch',
  4401. description: __('Defines if sipgate.io (http://www.sipgate.io) is enabled or not.'),
  4402. options: {
  4403. form: [
  4404. {
  4405. display: '',
  4406. null: true,
  4407. name: 'sipgate_integration',
  4408. tag: 'boolean',
  4409. options: {
  4410. true => 'yes',
  4411. false => 'no',
  4412. },
  4413. },
  4414. ],
  4415. },
  4416. state: false,
  4417. preferences: {
  4418. prio: 1,
  4419. trigger: ['menu:render', 'cti:reload'],
  4420. authentication: true,
  4421. permission: ['admin.integration'],
  4422. },
  4423. frontend: true
  4424. )
  4425. Setting.create_if_not_exists(
  4426. title: __('sipgate.io Token'),
  4427. name: 'sipgate_token',
  4428. area: 'Integration::Sipgate',
  4429. description: __('Token for Sipgate.'),
  4430. options: {
  4431. form: [
  4432. {
  4433. display: '',
  4434. null: false,
  4435. name: 'sipgate_token',
  4436. tag: 'input',
  4437. },
  4438. ],
  4439. },
  4440. state: ENV['SIPGATE_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4441. preferences: {
  4442. permission: ['admin.integration'],
  4443. },
  4444. frontend: false
  4445. )
  4446. Setting.create_if_not_exists(
  4447. title: __('sipgate.io config'),
  4448. name: 'sipgate_config',
  4449. area: 'Integration::Sipgate',
  4450. description: __('Defines the sipgate.io config.'),
  4451. options: {},
  4452. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4453. preferences: {
  4454. prio: 2,
  4455. permission: ['admin.integration'],
  4456. },
  4457. frontend: false,
  4458. )
  4459. Setting.create_if_not_exists(
  4460. title: __('sipgate.io alternative FQDN'),
  4461. name: 'sipgate_alternative_fqdn',
  4462. area: 'Integration::Sipgate::Expert',
  4463. description: __('Alternative FQDN for callbacks if you operate Zammad in an internal network.'),
  4464. options: {
  4465. form: [
  4466. {
  4467. display: '',
  4468. null: false,
  4469. name: 'sipgate_alternative_fqdn',
  4470. tag: 'input',
  4471. },
  4472. ],
  4473. },
  4474. state: '',
  4475. preferences: {
  4476. permission: ['admin.integration'],
  4477. },
  4478. frontend: false
  4479. )
  4480. Setting.create_if_not_exists(
  4481. title: __('CTI integration'),
  4482. name: 'cti_integration',
  4483. area: 'Integration::Switch',
  4484. description: __('Defines if generic CTI integration is enabled or not.'),
  4485. options: {
  4486. form: [
  4487. {
  4488. display: '',
  4489. null: true,
  4490. name: 'cti_integration',
  4491. tag: 'boolean',
  4492. options: {
  4493. true => 'yes',
  4494. false => 'no',
  4495. },
  4496. },
  4497. ],
  4498. },
  4499. state: false,
  4500. preferences: {
  4501. prio: 1,
  4502. trigger: ['menu:render', 'cti:reload'],
  4503. authentication: true,
  4504. permission: ['admin.integration'],
  4505. },
  4506. frontend: true
  4507. )
  4508. Setting.create_if_not_exists(
  4509. title: __('CTI config'),
  4510. name: 'cti_config',
  4511. area: 'Integration::Cti',
  4512. description: __('Defines the CTI config.'),
  4513. options: {},
  4514. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4515. preferences: {
  4516. prio: 2,
  4517. permission: ['admin.integration'],
  4518. },
  4519. frontend: false,
  4520. )
  4521. Setting.create_if_not_exists(
  4522. title: __('CTI Token'),
  4523. name: 'cti_token',
  4524. area: 'Integration::Cti',
  4525. description: __('Token for CTI.'),
  4526. options: {
  4527. form: [
  4528. {
  4529. display: '',
  4530. null: false,
  4531. name: 'cti_token',
  4532. tag: 'input',
  4533. },
  4534. ],
  4535. },
  4536. state: ENV['CTI_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4537. preferences: {
  4538. permission: ['admin.integration'],
  4539. },
  4540. frontend: false
  4541. )
  4542. Setting.create_if_not_exists(
  4543. title: __('CTI customer last activity'),
  4544. name: 'cti_customer_last_activity',
  4545. area: 'Integration::Cti',
  4546. description: __('Defines the duration of customer activity (in seconds) on a call until the user profile dialog is shown.'),
  4547. options: {},
  4548. state: 30.days,
  4549. preferences: {
  4550. prio: 2,
  4551. permission: ['admin.integration'],
  4552. },
  4553. frontend: false,
  4554. )
  4555. Setting.create_if_not_exists(
  4556. title: __('Placetel integration'),
  4557. name: 'placetel_integration',
  4558. area: 'Integration::Switch',
  4559. description: __('Defines if Placetel (http://www.placetel.de) is enabled or not.'),
  4560. options: {
  4561. form: [
  4562. {
  4563. display: '',
  4564. null: true,
  4565. name: 'placetel_integration',
  4566. tag: 'boolean',
  4567. options: {
  4568. true => 'yes',
  4569. false => 'no',
  4570. },
  4571. },
  4572. ],
  4573. },
  4574. state: false,
  4575. preferences: {
  4576. prio: 1,
  4577. trigger: ['menu:render', 'cti:reload'],
  4578. authentication: true,
  4579. permission: ['admin.integration'],
  4580. },
  4581. frontend: true
  4582. )
  4583. Setting.create_if_not_exists(
  4584. title: __('Placetel config'),
  4585. name: 'placetel_config',
  4586. area: 'Integration::Placetel',
  4587. description: __('Defines the Placetel config.'),
  4588. options: {},
  4589. state: { 'outbound' => { 'routing_table' => [], 'default_caller_id' => '' }, 'inbound' => { 'block_caller_ids' => [] } },
  4590. preferences: {
  4591. prio: 2,
  4592. permission: ['admin.integration'],
  4593. cache: ['placetelGetVoipUsers'],
  4594. },
  4595. frontend: false,
  4596. )
  4597. Setting.create_if_not_exists(
  4598. title: __('Placetel Token'),
  4599. name: 'placetel_token',
  4600. area: 'Integration::Placetel',
  4601. description: __('Defines the token for Placetel.'),
  4602. options: {
  4603. form: [
  4604. {
  4605. display: '',
  4606. null: false,
  4607. name: 'placetel_token',
  4608. tag: 'input',
  4609. },
  4610. ],
  4611. },
  4612. state: ENV['PLACETEL_TOKEN'] || SecureRandom.urlsafe_base64(20),
  4613. preferences: {
  4614. permission: ['admin.integration'],
  4615. },
  4616. frontend: false
  4617. )
  4618. Setting.create_if_not_exists(
  4619. title: __('Clearbit integration'),
  4620. name: 'clearbit_integration',
  4621. area: 'Integration::Switch',
  4622. description: __('Defines if Clearbit (http://www.clearbit.com) is enabled or not.'),
  4623. options: {
  4624. form: [
  4625. {
  4626. display: '',
  4627. null: true,
  4628. name: 'clearbit_integration',
  4629. tag: 'boolean',
  4630. options: {
  4631. true => 'yes',
  4632. false => 'no',
  4633. },
  4634. },
  4635. ],
  4636. },
  4637. state: false,
  4638. preferences: {
  4639. prio: 1,
  4640. permission: ['admin.integration'],
  4641. },
  4642. frontend: false
  4643. )
  4644. Setting.create_if_not_exists(
  4645. title: __('Clearbit config'),
  4646. name: 'clearbit_config',
  4647. area: 'Integration::Clearbit',
  4648. description: __('Defines the Clearbit config.'),
  4649. options: {},
  4650. state: {},
  4651. frontend: false,
  4652. preferences: {
  4653. prio: 2,
  4654. permission: ['admin.integration'],
  4655. },
  4656. )
  4657. Setting.create_if_not_exists(
  4658. title: __('Defines transaction backend.'),
  4659. name: '9000_clearbit_enrichment',
  4660. area: 'Transaction::Backend::Async',
  4661. description: __('Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com).'),
  4662. options: {},
  4663. state: 'Transaction::ClearbitEnrichment',
  4664. frontend: false
  4665. )
  4666. Setting.create_if_not_exists(
  4667. title: __('Defines transaction backend.'),
  4668. name: '9100_cti_caller_id_detection',
  4669. area: 'Transaction::Backend::Async',
  4670. description: __('Defines the transaction backend which detects caller IDs in objects and stores them for CTI lookups.'),
  4671. options: {},
  4672. state: 'Transaction::CtiCallerIdDetection',
  4673. frontend: false
  4674. )
  4675. Setting.create_if_not_exists(
  4676. title: __('Defines transaction backend.'),
  4677. name: '9200_karma',
  4678. area: 'Transaction::Backend::Async',
  4679. description: __('Defines the transaction backend which creates the karma score.'),
  4680. options: {},
  4681. state: 'Transaction::Karma',
  4682. frontend: false
  4683. )
  4684. Setting.create_if_not_exists(
  4685. title: __('Defines karma levels.'),
  4686. name: 'karma_levels',
  4687. area: 'Core::Karma',
  4688. description: __('Defines the karma levels.'),
  4689. options: {},
  4690. state: [
  4691. {
  4692. name: __('Beginner'),
  4693. start: 0,
  4694. end: 499,
  4695. },
  4696. {
  4697. name: __('Newbie'),
  4698. start: 500,
  4699. end: 1999,
  4700. },
  4701. {
  4702. name: __('Intermediate'),
  4703. start: 2000,
  4704. end: 4999,
  4705. },
  4706. {
  4707. name: __('Professional'),
  4708. start: 5000,
  4709. end: 6999,
  4710. },
  4711. {
  4712. name: __('Expert'),
  4713. start: 7000,
  4714. end: 8999,
  4715. },
  4716. {
  4717. name: __('Master'),
  4718. start: 9000,
  4719. end: 18_999,
  4720. },
  4721. {
  4722. name: __('Evangelist'),
  4723. start: 19_000,
  4724. end: 49_999,
  4725. },
  4726. {
  4727. name: __('Hero'),
  4728. start: 50_000,
  4729. end: nil,
  4730. },
  4731. ],
  4732. frontend: false
  4733. )
  4734. Setting.create_if_not_exists(
  4735. title: __('Set agent limit'),
  4736. name: 'system_agent_limit',
  4737. area: 'Core::Online',
  4738. description: __('Defines the agent limit.'),
  4739. options: {},
  4740. state: false,
  4741. preferences: { online_service_disable: true },
  4742. frontend: false
  4743. )
  4744. Setting.create_if_not_exists(
  4745. title: __('HTML Email CSS Font'),
  4746. name: 'html_email_css_font',
  4747. area: 'Core',
  4748. description: __('Defines the CSS font information for HTML emails.'),
  4749. options: {},
  4750. state: "font-family:'Helvetica Neue', Helvetica, Arial, Geneva, sans-serif; font-size: 12px;",
  4751. preferences: {
  4752. permission: ['admin'],
  4753. },
  4754. frontend: false
  4755. )
  4756. # add the dashboard stats backend for 'Stats::TicketWaitingTime'
  4757. Setting.create_if_not_exists(
  4758. title: __('Stats Backend'),
  4759. name: 'Stats::TicketWaitingTime',
  4760. area: 'Dashboard::Stats',
  4761. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4762. options: {},
  4763. state: 'Stats::TicketWaitingTime',
  4764. preferences: {
  4765. permission: ['ticket.agent'],
  4766. prio: 1,
  4767. },
  4768. frontend: false
  4769. )
  4770. # add the dashboard stats backend for 'Stats::TicketEscalation'
  4771. Setting.create_if_not_exists(
  4772. title: __('Stats Backend'),
  4773. name: 'Stats::TicketEscalation',
  4774. area: 'Dashboard::Stats',
  4775. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4776. options: {},
  4777. state: 'Stats::TicketEscalation',
  4778. preferences: {
  4779. permission: ['ticket.agent'],
  4780. prio: 2,
  4781. },
  4782. frontend: false
  4783. )
  4784. # add the dashboard stats backend for 'Stats::TicketChannelDistribution'
  4785. Setting.create_if_not_exists(
  4786. title: __('Stats Backend'),
  4787. name: 'Stats::TicketChannelDistribution',
  4788. area: 'Dashboard::Stats',
  4789. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4790. options: {},
  4791. state: 'Stats::TicketChannelDistribution',
  4792. preferences: {
  4793. permission: ['ticket.agent'],
  4794. prio: 3,
  4795. },
  4796. frontend: false
  4797. )
  4798. # add the dashboard stats backend for 'Stats::TicketLoadMeasure'
  4799. Setting.create_if_not_exists(
  4800. title: __('Stats Backend'),
  4801. name: 'Stats::TicketLoadMeasure',
  4802. area: 'Dashboard::Stats',
  4803. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4804. options: {},
  4805. state: 'Stats::TicketLoadMeasure',
  4806. preferences: {
  4807. permission: ['ticket.agent'],
  4808. prio: 4,
  4809. },
  4810. frontend: false
  4811. )
  4812. # add the dashboard stats backend for 'Stats::TicketInProcess'
  4813. Setting.create_if_not_exists(
  4814. title: __('Stats Backend'),
  4815. name: 'Stats::TicketInProcess',
  4816. area: 'Dashboard::Stats',
  4817. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4818. options: {},
  4819. state: 'Stats::TicketInProcess',
  4820. preferences: {
  4821. permission: ['ticket.agent'],
  4822. prio: 5,
  4823. },
  4824. frontend: false
  4825. )
  4826. # add the dashboard stats backend for 'Stats::TicketReopen'
  4827. Setting.create_if_not_exists(
  4828. title: __('Stats Backend'),
  4829. name: 'Stats::TicketReopen',
  4830. area: 'Dashboard::Stats',
  4831. description: __('Defines a dashboard stats backend that gets scheduled automatically.'),
  4832. options: {},
  4833. state: 'Stats::TicketReopen',
  4834. preferences: {
  4835. permission: ['ticket.agent'],
  4836. prio: 6,
  4837. },
  4838. frontend: false
  4839. )
  4840. Setting.create_if_not_exists(
  4841. title: __('Knowledge Base multilingual support'),
  4842. name: 'kb_multi_lingual_support',
  4843. area: 'Kb::Core',
  4844. description: __('Support of multilingual Knowledge Base.'),
  4845. options: {},
  4846. state: true,
  4847. preferences: { online_service_disable: true },
  4848. frontend: true
  4849. )
  4850. Setting.create_if_not_exists(
  4851. title: __('Knowledge Base active'),
  4852. name: 'kb_active',
  4853. area: 'Kb::Core',
  4854. description: __('Defines if Knowledge Base navbar button is enabled.'),
  4855. state: true,
  4856. preferences: {
  4857. prio: 1,
  4858. trigger: ['menu:render'],
  4859. authentication: true,
  4860. permission: ['admin.knowledge_base'],
  4861. },
  4862. frontend: true
  4863. )
  4864. Setting.create_if_not_exists(
  4865. title: __('Knowledge Base active publicly'),
  4866. name: 'kb_active_publicly',
  4867. area: 'Kb::Core',
  4868. description: __('Defines if Knowledge Base navbar button is enabled for users without Knowledge Base permission.'),
  4869. state: false,
  4870. preferences: {
  4871. prio: 1,
  4872. trigger: ['menu:render'],
  4873. authentication: true,
  4874. permission: [],
  4875. },
  4876. frontend: true
  4877. )
  4878. Setting.create_if_not_exists(
  4879. title: __('Defines the timeframe during which a self-created note can be deleted.'),
  4880. name: 'ui_ticket_zoom_article_delete_timeframe',
  4881. area: 'UI::TicketZoomArticle',
  4882. description: __("Set timeframe in seconds. If it's set to 0 you can delete notes without time limits"),
  4883. options: {},
  4884. state: 600,
  4885. preferences: {
  4886. permission: ['admin.ui']
  4887. },
  4888. frontend: true
  4889. )
  4890. Setting.create_if_not_exists(
  4891. title: __('S/MIME integration'),
  4892. name: 'smime_integration',
  4893. area: 'Integration::Switch',
  4894. description: __('Defines if S/MIME encryption is enabled or not.'),
  4895. options: {
  4896. form: [
  4897. {
  4898. display: '',
  4899. null: true,
  4900. name: 'smime_integration',
  4901. tag: 'boolean',
  4902. options: {
  4903. true => 'yes',
  4904. false => 'no',
  4905. },
  4906. },
  4907. ],
  4908. },
  4909. state: false,
  4910. preferences: {
  4911. prio: 1,
  4912. authentication: true,
  4913. permission: ['admin.integration'],
  4914. },
  4915. frontend: true
  4916. )
  4917. Setting.create_if_not_exists(
  4918. title: __('S/MIME config'),
  4919. name: 'smime_config',
  4920. area: 'Integration::SMIME',
  4921. description: __('Defines the S/MIME config.'),
  4922. options: {},
  4923. state: {},
  4924. preferences: {
  4925. prio: 2,
  4926. permission: ['admin.integration'],
  4927. },
  4928. frontend: true,
  4929. )
  4930. Setting.create_if_not_exists(
  4931. title: __('Authentication via %s'),
  4932. name: 'auth_sso',
  4933. area: 'Security::ThirdPartyAuthentication',
  4934. description: __('Enables button for user authentication via %s. The button will redirect to /auth/sso on user interaction.'),
  4935. options: {
  4936. form: [
  4937. {
  4938. display: '',
  4939. null: true,
  4940. name: 'auth_sso',
  4941. tag: 'boolean',
  4942. options: {
  4943. true => 'yes',
  4944. false => 'no',
  4945. },
  4946. },
  4947. ],
  4948. },
  4949. preferences: {
  4950. controller: 'SettingsAreaSwitch',
  4951. sub: {},
  4952. title_i18n: ['SSO'],
  4953. description_i18n: ['SSO'],
  4954. permission: ['admin.security'],
  4955. },
  4956. state: false,
  4957. frontend: true
  4958. )