settings.rb 119 KB

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