settings.rb 112 KB

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