settings.rb 134 KB

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