settings.rb 123 KB

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