settings.rb 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852
  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_or_update(
  160. title: 'Pretty Date',
  161. name: 'pretty_date_format',
  162. area: 'System::Branding',
  163. description: 'Defines pretty date format.',
  164. options: {
  165. form: [
  166. {
  167. display: '',
  168. null: false,
  169. name: 'pretty_date_format',
  170. tag: 'select',
  171. options: {
  172. 'relative': 'relative - e. g. "2 hours ago" or "2 days and 15 minutes ago"',
  173. 'absolute': 'absolute - e. g. "Monday 09:30" or "Tuesday 23. Feb 14:20"',
  174. },
  175. },
  176. ],
  177. },
  178. preferences: {
  179. render: true,
  180. prio: 10,
  181. permission: ['admin.branding'],
  182. },
  183. state: 'relative',
  184. frontend: true
  185. )
  186. options = {}
  187. (10..99).each { |item|
  188. options[item] = item
  189. }
  190. system_id = rand(10..99)
  191. Setting.create_if_not_exists(
  192. title: 'SystemID',
  193. name: 'system_id',
  194. area: 'System::Base',
  195. 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).',
  196. options: {
  197. form: [
  198. {
  199. display: '',
  200. null: true,
  201. name: 'system_id',
  202. tag: 'select',
  203. options: options,
  204. },
  205. ],
  206. },
  207. state: system_id,
  208. preferences: {
  209. online_service_disable: true,
  210. placeholder: true,
  211. authentication: true,
  212. permission: ['admin.system'],
  213. },
  214. frontend: true
  215. )
  216. Setting.create_if_not_exists(
  217. title: 'Fully Qualified Domain Name',
  218. name: 'fqdn',
  219. area: 'System::Base',
  220. 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.',
  221. options: {
  222. form: [
  223. {
  224. display: '',
  225. null: false,
  226. name: 'fqdn',
  227. tag: 'input',
  228. },
  229. ],
  230. },
  231. state: 'zammad.example.com',
  232. preferences: {
  233. online_service_disable: true,
  234. placeholder: true,
  235. permission: ['admin.system'],
  236. },
  237. frontend: true
  238. )
  239. Setting.create_if_not_exists(
  240. title: 'Websocket port',
  241. name: 'websocket_port',
  242. area: 'System::WebSocket',
  243. description: 'Defines the port of the websocket server.',
  244. options: {
  245. form: [
  246. {
  247. display: '',
  248. null: false,
  249. name: 'websocket_port',
  250. tag: 'input',
  251. },
  252. ],
  253. },
  254. state: '6042',
  255. preferences: { online_service_disable: true },
  256. frontend: true
  257. )
  258. Setting.create_if_not_exists(
  259. title: 'HTTP type',
  260. name: 'http_type',
  261. area: 'System::Base',
  262. description: 'Define the http protocol of your instance.',
  263. options: {
  264. form: [
  265. {
  266. display: '',
  267. null: true,
  268. name: 'http_type',
  269. tag: 'select',
  270. options: {
  271. 'https' => 'https',
  272. 'http' => 'http',
  273. },
  274. },
  275. ],
  276. },
  277. state: 'http',
  278. preferences: {
  279. online_service_disable: true,
  280. placeholder: true,
  281. permission: ['admin.system'],
  282. },
  283. frontend: true
  284. )
  285. Setting.create_if_not_exists(
  286. title: 'Storage Mechanism',
  287. name: 'storage_provider',
  288. area: 'System::Storage',
  289. 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.',
  290. options: {
  291. form: [
  292. {
  293. display: '',
  294. null: true,
  295. name: 'storage_provider',
  296. tag: 'select',
  297. tranlate: true,
  298. options: {
  299. 'DB' => 'Database',
  300. 'File' => 'Filesystem',
  301. },
  302. },
  303. ],
  304. },
  305. state: 'DB',
  306. preferences: {
  307. controller: 'SettingsAreaStorageProvider',
  308. online_service_disable: true,
  309. permission: ['admin.system'],
  310. },
  311. frontend: false
  312. )
  313. Setting.create_if_not_exists(
  314. title: 'Image Service',
  315. name: 'image_backend',
  316. area: 'System::Services',
  317. description: 'Defines the backend for user and organization image lookups.',
  318. options: {
  319. form: [
  320. {
  321. display: '',
  322. null: true,
  323. name: 'image_backend',
  324. tag: 'select',
  325. options: {
  326. '' => '-',
  327. 'Service::Image::Zammad' => 'Zammad Image Service',
  328. },
  329. },
  330. ],
  331. },
  332. state: 'Service::Image::Zammad',
  333. preferences: {
  334. prio: 1,
  335. permission: ['admin.system'],
  336. },
  337. frontend: false
  338. )
  339. Setting.create_if_not_exists(
  340. title: 'Geo IP Service',
  341. name: 'geo_ip_backend',
  342. area: 'System::Services',
  343. description: 'Defines the backend for geo IP lookups. Shows also location of an IP address if an IP address is shown.',
  344. options: {
  345. form: [
  346. {
  347. display: '',
  348. null: true,
  349. name: 'geo_ip_backend',
  350. tag: 'select',
  351. options: {
  352. '' => '-',
  353. 'Service::GeoIp::Zammad' => 'Zammad GeoIP Service',
  354. },
  355. },
  356. ],
  357. },
  358. state: 'Service::GeoIp::Zammad',
  359. preferences: {
  360. prio: 2,
  361. permission: ['admin.system'],
  362. },
  363. frontend: false
  364. )
  365. Setting.create_if_not_exists(
  366. title: 'Geo Location Service',
  367. name: 'geo_location_backend',
  368. area: 'System::Services',
  369. description: 'Defines the backend for geo location lookups to store geo locations for addresses.',
  370. options: {
  371. form: [
  372. {
  373. display: '',
  374. null: true,
  375. name: 'geo_location_backend',
  376. tag: 'select',
  377. options: {
  378. '' => '-',
  379. 'Service::GeoLocation::Gmaps' => 'Google Maps',
  380. },
  381. },
  382. ],
  383. },
  384. state: 'Service::GeoLocation::Gmaps',
  385. preferences: {
  386. prio: 3,
  387. permission: ['admin.system'],
  388. },
  389. frontend: false
  390. )
  391. Setting.create_if_not_exists(
  392. title: 'Geo Calendar Service',
  393. name: 'geo_calendar_backend',
  394. area: 'System::Services',
  395. description: 'Defines the backend for geo calendar lookups. Used for initial calendar succession.',
  396. options: {
  397. form: [
  398. {
  399. display: '',
  400. null: true,
  401. name: 'geo_calendar_backend',
  402. tag: 'select',
  403. options: {
  404. '' => '-',
  405. 'Service::GeoCalendar::Zammad' => 'Zammad GeoCalendar Service',
  406. },
  407. },
  408. ],
  409. },
  410. state: 'Service::GeoCalendar::Zammad',
  411. preferences: {
  412. prio: 2,
  413. permission: ['admin.system'],
  414. },
  415. frontend: false
  416. )
  417. Setting.create_if_not_exists(
  418. title: 'Proxy Settings',
  419. name: 'proxy',
  420. area: 'System::Network',
  421. description: 'Address of the proxy server for http and https resources.',
  422. options: {
  423. form: [
  424. {
  425. display: '',
  426. null: false,
  427. name: 'proxy',
  428. tag: 'input',
  429. placeholder: 'proxy.example.com:3128',
  430. },
  431. ],
  432. },
  433. state: '',
  434. preferences: {
  435. online_service_disable: true,
  436. controller: 'SettingsAreaProxy',
  437. prio: 1,
  438. permission: ['admin.system'],
  439. },
  440. frontend: false
  441. )
  442. Setting.create_if_not_exists(
  443. title: 'Proxy User',
  444. name: 'proxy_username',
  445. area: 'System::Network',
  446. description: 'Username for proxy connection.',
  447. options: {
  448. form: [
  449. {
  450. display: '',
  451. null: false,
  452. name: 'proxy_username',
  453. tag: 'input',
  454. },
  455. ],
  456. },
  457. state: '',
  458. preferences: {
  459. disabled: true,
  460. online_service_disable: true,
  461. prio: 2,
  462. permission: ['admin.system'],
  463. },
  464. frontend: false
  465. )
  466. Setting.create_if_not_exists(
  467. title: 'Proxy Password',
  468. name: 'proxy_password',
  469. area: 'System::Network',
  470. description: 'Password for proxy connection.',
  471. options: {
  472. form: [
  473. {
  474. display: '',
  475. null: false,
  476. name: 'proxy_passowrd',
  477. tag: 'input',
  478. },
  479. ],
  480. },
  481. state: '',
  482. preferences: {
  483. disabled: true,
  484. online_service_disable: true,
  485. prio: 3,
  486. permission: ['admin.system'],
  487. },
  488. frontend: false
  489. )
  490. Setting.create_if_not_exists(
  491. title: 'Send client stats',
  492. name: 'ui_send_client_stats',
  493. area: 'System::UI',
  494. description: 'Send client stats/error message to central server to improve the usability.',
  495. options: {
  496. form: [
  497. {
  498. display: '',
  499. null: true,
  500. name: 'ui_send_client_stats',
  501. tag: 'boolean',
  502. options: {
  503. true => 'yes',
  504. false => 'no',
  505. },
  506. },
  507. ],
  508. },
  509. state: false,
  510. preferences: {
  511. prio: 1,
  512. permission: ['admin.system'],
  513. },
  514. frontend: true
  515. )
  516. Setting.create_if_not_exists(
  517. title: 'Client storage',
  518. name: 'ui_client_storage',
  519. area: 'System::UI',
  520. description: 'Use client storage to cache data to enhance performance of application.',
  521. options: {
  522. form: [
  523. {
  524. display: '',
  525. null: true,
  526. name: 'ui_client_storage',
  527. tag: 'boolean',
  528. options: {
  529. true => 'yes',
  530. false => 'no',
  531. },
  532. },
  533. ],
  534. },
  535. state: false,
  536. preferences: {
  537. prio: 2,
  538. permission: ['admin.system'],
  539. },
  540. frontend: true
  541. )
  542. Setting.create_if_not_exists(
  543. title: 'Define default visibility of new a new article',
  544. name: 'ui_ticket_zoom_article_new_internal',
  545. area: 'UI::TicketZoom',
  546. description: 'Set default visibility of new a new article.',
  547. options: {
  548. form: [
  549. {
  550. display: '',
  551. null: true,
  552. name: 'ui_ticket_zoom_article_new_internal',
  553. tag: 'boolean',
  554. translate: true,
  555. options: {
  556. true => 'internal',
  557. false => 'public',
  558. },
  559. },
  560. ],
  561. },
  562. state: true,
  563. preferences: {
  564. prio: 1,
  565. permission: ['admin.ui'],
  566. },
  567. frontend: true
  568. )
  569. Setting.create_if_not_exists(
  570. title: 'New User Accounts',
  571. name: 'user_create_account',
  572. area: 'Security::Base',
  573. description: 'Enables users to create their own account via web interface.',
  574. options: {
  575. form: [
  576. {
  577. display: '',
  578. null: true,
  579. name: 'user_create_account',
  580. tag: 'boolean',
  581. options: {
  582. true => 'yes',
  583. false => 'no',
  584. },
  585. },
  586. ],
  587. },
  588. state: true,
  589. preferences: {
  590. permission: ['admin.security'],
  591. },
  592. frontend: true
  593. )
  594. Setting.create_if_not_exists(
  595. title: 'Lost Password',
  596. name: 'user_lost_password',
  597. area: 'Security::Base',
  598. description: 'Activates lost password feature for users.',
  599. options: {
  600. form: [
  601. {
  602. display: '',
  603. null: true,
  604. name: 'user_lost_password',
  605. tag: 'boolean',
  606. options: {
  607. true => 'yes',
  608. false => 'no',
  609. },
  610. },
  611. ],
  612. },
  613. state: true,
  614. preferences: {
  615. permission: ['admin.security'],
  616. },
  617. frontend: true
  618. )
  619. Setting.create_if_not_exists(
  620. title: 'Authentication via %s',
  621. name: 'auth_ldap',
  622. area: 'Security::Authentication',
  623. description: 'Enables user authentication via %s.',
  624. preferences: {
  625. title_i18n: ['LDAP'],
  626. description_i18n: ['LDAP'],
  627. permission: ['admin.security'],
  628. },
  629. state: {
  630. adapter: 'Auth::Ldap',
  631. host: 'localhost',
  632. port: 389,
  633. bind_dn: 'cn=Manager,dc=example,dc=org',
  634. bind_pw: 'example',
  635. uid: 'mail',
  636. base: 'dc=example,dc=org',
  637. always_filter: '',
  638. always_roles: %w(Admin Agent),
  639. always_groups: ['Users'],
  640. sync_params: {
  641. firstname: 'sn',
  642. lastname: 'givenName',
  643. email: 'mail',
  644. login: 'mail',
  645. },
  646. },
  647. frontend: false
  648. )
  649. Setting.create_if_not_exists(
  650. title: 'Authentication via %s',
  651. name: 'auth_twitter',
  652. area: 'Security::ThirdPartyAuthentication',
  653. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  654. options: {
  655. form: [
  656. {
  657. display: '',
  658. null: true,
  659. name: 'auth_twitter',
  660. tag: 'boolean',
  661. options: {
  662. true => 'yes',
  663. false => 'no',
  664. },
  665. },
  666. ],
  667. },
  668. preferences: {
  669. controller: 'SettingsAreaSwitch',
  670. sub: ['auth_twitter_credentials'],
  671. title_i18n: ['Twitter'],
  672. description_i18n: ['Twitter', 'Twitter Developer Site', 'https://dev.twitter.com/apps'],
  673. permission: ['admin.security'],
  674. },
  675. state: false,
  676. frontend: true
  677. )
  678. Setting.create_if_not_exists(
  679. title: 'Twitter App Credentials',
  680. name: 'auth_twitter_credentials',
  681. area: 'Security::ThirdPartyAuthentication::Twitter',
  682. description: 'App credentials for Twitter.',
  683. options: {
  684. form: [
  685. {
  686. display: 'Twitter Key',
  687. null: true,
  688. name: 'key',
  689. tag: 'input',
  690. },
  691. {
  692. display: 'Twitter Secret',
  693. null: true,
  694. name: 'secret',
  695. tag: 'input',
  696. },
  697. ],
  698. },
  699. state: {},
  700. preferences: {
  701. permission: ['admin.security'],
  702. },
  703. frontend: false
  704. )
  705. Setting.create_if_not_exists(
  706. title: 'Authentication via %s',
  707. name: 'auth_facebook',
  708. area: 'Security::ThirdPartyAuthentication',
  709. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  710. options: {
  711. form: [
  712. {
  713. display: '',
  714. null: true,
  715. name: 'auth_facebook',
  716. tag: 'boolean',
  717. options: {
  718. true => 'yes',
  719. false => 'no',
  720. },
  721. },
  722. ],
  723. },
  724. preferences: {
  725. controller: 'SettingsAreaSwitch',
  726. sub: ['auth_facebook_credentials'],
  727. title_i18n: ['Facebook'],
  728. description_i18n: ['Facebook', 'Facebook Developer Site', 'https://developers.facebook.com/apps/'],
  729. permission: ['admin.security'],
  730. },
  731. state: false,
  732. frontend: true
  733. )
  734. Setting.create_if_not_exists(
  735. title: 'Facebook App Credentials',
  736. name: 'auth_facebook_credentials',
  737. area: 'Security::ThirdPartyAuthentication::Facebook',
  738. description: 'App credentials for Facebook.',
  739. options: {
  740. form: [
  741. {
  742. display: 'App ID',
  743. null: true,
  744. name: 'app_id',
  745. tag: 'input',
  746. },
  747. {
  748. display: 'App Secret',
  749. null: true,
  750. name: 'app_secret',
  751. tag: 'input',
  752. },
  753. ],
  754. },
  755. state: {},
  756. preferences: {
  757. permission: ['admin.security'],
  758. },
  759. frontend: false
  760. )
  761. Setting.create_if_not_exists(
  762. title: 'Authentication via %s',
  763. name: 'auth_google_oauth2',
  764. area: 'Security::ThirdPartyAuthentication',
  765. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  766. options: {
  767. form: [
  768. {
  769. display: '',
  770. null: true,
  771. name: 'auth_google_oauth2',
  772. tag: 'boolean',
  773. options: {
  774. true => 'yes',
  775. false => 'no',
  776. },
  777. },
  778. ],
  779. },
  780. preferences: {
  781. controller: 'SettingsAreaSwitch',
  782. sub: ['auth_google_oauth2_credentials'],
  783. title_i18n: ['Google'],
  784. description_i18n: ['Google', 'Google API Console Site', 'https://console.developers.google.com/apis/credentials'],
  785. permission: ['admin.security'],
  786. },
  787. state: false,
  788. frontend: true
  789. )
  790. Setting.create_if_not_exists(
  791. title: 'Google App Credentials',
  792. name: 'auth_google_oauth2_credentials',
  793. area: 'Security::ThirdPartyAuthentication::Google',
  794. description: 'Enables user authentication via Google.',
  795. options: {
  796. form: [
  797. {
  798. display: 'Client ID',
  799. null: true,
  800. name: 'client_id',
  801. tag: 'input',
  802. },
  803. {
  804. display: 'Client Secret',
  805. null: true,
  806. name: 'client_secret',
  807. tag: 'input',
  808. },
  809. ],
  810. },
  811. state: {},
  812. preferences: {
  813. permission: ['admin.security'],
  814. },
  815. frontend: false
  816. )
  817. Setting.create_if_not_exists(
  818. title: 'Authentication via %s',
  819. name: 'auth_linkedin',
  820. area: 'Security::ThirdPartyAuthentication',
  821. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  822. options: {
  823. form: [
  824. {
  825. display: '',
  826. null: true,
  827. name: 'auth_linkedin',
  828. tag: 'boolean',
  829. options: {
  830. true => 'yes',
  831. false => 'no',
  832. },
  833. },
  834. ],
  835. },
  836. preferences: {
  837. controller: 'SettingsAreaSwitch',
  838. sub: ['auth_linkedin_credentials'],
  839. title_i18n: ['LinkedIn'],
  840. description_i18n: ['LinkedIn', 'Linkedin Developer Site', 'https://www.linkedin.com/developer/apps'],
  841. permission: ['admin.security'],
  842. },
  843. state: false,
  844. frontend: true
  845. )
  846. Setting.create_if_not_exists(
  847. title: 'LinkedIn App Credentials',
  848. name: 'auth_linkedin_credentials',
  849. area: 'Security::ThirdPartyAuthentication::Linkedin',
  850. description: 'Enables user authentication via LinkedIn.',
  851. options: {
  852. form: [
  853. {
  854. display: 'App ID',
  855. null: true,
  856. name: 'app_id',
  857. tag: 'input',
  858. },
  859. {
  860. display: 'App Secret',
  861. null: true,
  862. name: 'app_secret',
  863. tag: 'input',
  864. },
  865. ],
  866. },
  867. state: {},
  868. preferences: {
  869. permission: ['admin.security'],
  870. },
  871. frontend: false
  872. )
  873. Setting.create_if_not_exists(
  874. title: 'Authentication via %s',
  875. name: 'auth_github',
  876. area: 'Security::ThirdPartyAuthentication',
  877. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  878. options: {
  879. form: [
  880. {
  881. display: '',
  882. null: true,
  883. name: 'auth_github',
  884. tag: 'boolean',
  885. options: {
  886. true => 'yes',
  887. false => 'no',
  888. },
  889. },
  890. ],
  891. },
  892. preferences: {
  893. controller: 'SettingsAreaSwitch',
  894. sub: ['auth_github_credentials'],
  895. title_i18n: ['Github'],
  896. description_i18n: ['Github', 'Github OAuth Applications', 'https://github.com/settings/applications'],
  897. permission: ['admin.security'],
  898. },
  899. state: false,
  900. frontend: true
  901. )
  902. Setting.create_if_not_exists(
  903. title: 'Github App Credentials',
  904. name: 'auth_github_credentials',
  905. area: 'Security::ThirdPartyAuthentication::Github',
  906. description: 'Enables user authentication via Github.',
  907. options: {
  908. form: [
  909. {
  910. display: 'App ID',
  911. null: true,
  912. name: 'app_id',
  913. tag: 'input',
  914. },
  915. {
  916. display: 'App Secret',
  917. null: true,
  918. name: 'app_secret',
  919. tag: 'input',
  920. },
  921. ],
  922. },
  923. state: {},
  924. preferences: {
  925. permission: ['admin.security'],
  926. },
  927. frontend: false
  928. )
  929. Setting.create_if_not_exists(
  930. title: 'Authentication via %s',
  931. name: 'auth_gitlab',
  932. area: 'Security::ThirdPartyAuthentication',
  933. description: 'Enables user authentication via %s. Register your app first at [%s](%s).',
  934. options: {
  935. form: [
  936. {
  937. display: '',
  938. null: true,
  939. name: 'auth_gitlab',
  940. tag: 'boolean',
  941. options: {
  942. true => 'yes',
  943. false => 'no',
  944. },
  945. },
  946. ],
  947. },
  948. preferences: {
  949. controller: 'SettingsAreaSwitch',
  950. sub: ['auth_gitlab_credentials'],
  951. title_i18n: ['Gitlab'],
  952. description_i18n: ['Gitlab', 'Gitlab Applications', 'https://your-gitlab-host/admin/applications'],
  953. permission: ['admin.security'],
  954. },
  955. state: false,
  956. frontend: true
  957. )
  958. Setting.create_if_not_exists(
  959. title: 'Gitlab App Credentials',
  960. name: 'auth_gitlab_credentials',
  961. area: 'Security::ThirdPartyAuthentication::Gitlab',
  962. description: 'Enables user authentication via Gitlab.',
  963. options: {
  964. form: [
  965. {
  966. display: 'App ID',
  967. null: true,
  968. name: 'app_id',
  969. tag: 'input',
  970. },
  971. {
  972. display: 'App Secret',
  973. null: true,
  974. name: 'app_secret',
  975. tag: 'input',
  976. },
  977. {
  978. display: 'Site',
  979. null: true,
  980. name: 'site',
  981. tag: 'input',
  982. placeholder: 'https://gitlab.YOURDOMAIN.com',
  983. },
  984. ],
  985. },
  986. state: {},
  987. preferences: {
  988. permission: ['admin.security'],
  989. },
  990. frontend: false
  991. )
  992. Setting.create_if_not_exists(
  993. title: 'Authentication via %s',
  994. name: 'auth_oauth2',
  995. area: 'Security::ThirdPartyAuthentication',
  996. description: 'Enables user authentication via generic OAuth2. Register your app first.',
  997. options: {
  998. form: [
  999. {
  1000. display: '',
  1001. null: true,
  1002. name: 'auth_oauth2',
  1003. tag: 'boolean',
  1004. options: {
  1005. true => 'yes',
  1006. false => 'no',
  1007. },
  1008. },
  1009. ],
  1010. },
  1011. preferences: {
  1012. controller: 'SettingsAreaSwitch',
  1013. sub: ['auth_oauth2_credentials'],
  1014. title_i18n: ['Generic OAuth2'],
  1015. permission: ['admin.security'],
  1016. },
  1017. state: false,
  1018. frontend: true
  1019. )
  1020. Setting.create_if_not_exists(
  1021. title: 'Generic OAuth2 App Credentials',
  1022. name: 'auth_oauth2_credentials',
  1023. area: 'Security::ThirdPartyAuthentication::GenericOAuth',
  1024. description: 'Enables user authentication via generic OAuth2.',
  1025. options: {
  1026. form: [
  1027. {
  1028. display: 'Name',
  1029. null: true,
  1030. name: 'name',
  1031. tag: 'input',
  1032. placeholder: 'Some Provider Name',
  1033. },
  1034. {
  1035. display: 'App ID',
  1036. null: true,
  1037. name: 'app_id',
  1038. tag: 'input',
  1039. },
  1040. {
  1041. display: 'App Secret',
  1042. null: true,
  1043. name: 'app_secret',
  1044. tag: 'input',
  1045. },
  1046. {
  1047. display: 'Site',
  1048. null: true,
  1049. name: 'site',
  1050. tag: 'input',
  1051. placeholder: 'https://gitlab.YOURDOMAIN.com',
  1052. },
  1053. {
  1054. display: 'authorize_url',
  1055. null: true,
  1056. name: 'authorize_url',
  1057. tag: 'input',
  1058. placeholder: '/oauth/authorize',
  1059. },
  1060. {
  1061. display: 'token_url',
  1062. null: true,
  1063. name: 'token_url',
  1064. tag: 'input',
  1065. placeholder: '/oauth/token',
  1066. },
  1067. ],
  1068. },
  1069. state: {},
  1070. preferences: {
  1071. permission: ['admin.security'],
  1072. },
  1073. frontend: false
  1074. )
  1075. Setting.create_if_not_exists(
  1076. title: 'Minimum length',
  1077. name: 'password_min_size',
  1078. area: 'Security::Password',
  1079. description: 'Password needs to have at least a minimal number of characters.',
  1080. options: {
  1081. form: [
  1082. {
  1083. display: '',
  1084. null: true,
  1085. name: 'password_min_size',
  1086. tag: 'select',
  1087. options: {
  1088. 4 => ' 4',
  1089. 5 => ' 5',
  1090. 6 => ' 6',
  1091. 7 => ' 7',
  1092. 8 => ' 8',
  1093. 9 => ' 9',
  1094. 10 => '10',
  1095. 11 => '11',
  1096. 12 => '12',
  1097. 13 => '13',
  1098. 14 => '14',
  1099. 15 => '15',
  1100. 16 => '16',
  1101. 17 => '17',
  1102. 18 => '18',
  1103. 19 => '19',
  1104. 20 => '20',
  1105. },
  1106. },
  1107. ],
  1108. },
  1109. state: 6,
  1110. preferences: {
  1111. permission: ['admin.security'],
  1112. },
  1113. frontend: false
  1114. )
  1115. Setting.create_if_not_exists(
  1116. title: '2 lower and 2 upper characters',
  1117. name: 'password_min_2_lower_2_upper_characters',
  1118. area: 'Security::Password',
  1119. description: 'Password needs to contain 2 lower and 2 upper characters.',
  1120. options: {
  1121. form: [
  1122. {
  1123. display: '',
  1124. null: true,
  1125. name: 'password_min_2_lower_2_upper_characters',
  1126. tag: 'select',
  1127. options: {
  1128. 1 => 'yes',
  1129. 0 => 'no',
  1130. },
  1131. },
  1132. ],
  1133. },
  1134. state: 0,
  1135. preferences: {
  1136. permission: ['admin.security'],
  1137. },
  1138. frontend: false
  1139. )
  1140. Setting.create_if_not_exists(
  1141. title: 'Digit required',
  1142. name: 'password_need_digit',
  1143. area: 'Security::Password',
  1144. description: 'Password needs to contain at least one digit.',
  1145. options: {
  1146. form: [
  1147. {
  1148. display: 'Needed',
  1149. null: true,
  1150. name: 'password_need_digit',
  1151. tag: 'select',
  1152. options: {
  1153. 1 => 'yes',
  1154. 0 => 'no',
  1155. },
  1156. },
  1157. ],
  1158. },
  1159. state: 1,
  1160. preferences: {
  1161. permission: ['admin.security'],
  1162. },
  1163. frontend: false
  1164. )
  1165. Setting.create_if_not_exists(
  1166. title: 'Maximum failed logins',
  1167. name: 'password_max_login_failed',
  1168. area: 'Security::Password',
  1169. description: 'Number of failed logins after account will be deactivated.',
  1170. options: {
  1171. form: [
  1172. {
  1173. display: '',
  1174. null: true,
  1175. name: 'password_max_login_failed',
  1176. tag: 'select',
  1177. options: {
  1178. 4 => ' 4',
  1179. 5 => ' 5',
  1180. 6 => ' 6',
  1181. 7 => ' 7',
  1182. 8 => ' 8',
  1183. 9 => ' 9',
  1184. 10 => '10',
  1185. 11 => '11',
  1186. 13 => '13',
  1187. 14 => '14',
  1188. 15 => '15',
  1189. 16 => '16',
  1190. 17 => '17',
  1191. 18 => '18',
  1192. 19 => '19',
  1193. 20 => '20',
  1194. },
  1195. },
  1196. ],
  1197. },
  1198. state: 10,
  1199. preferences: {
  1200. permission: ['admin.security'],
  1201. },
  1202. frontend: false
  1203. )
  1204. Setting.create_if_not_exists(
  1205. title: 'Ticket Hook',
  1206. name: 'ticket_hook',
  1207. area: 'Ticket::Base',
  1208. description: 'The identifier for a ticket, e. g. Ticket#, Call#, MyTicket#. The default is Ticket#.',
  1209. options: {
  1210. form: [
  1211. {
  1212. display: '',
  1213. null: false,
  1214. name: 'ticket_hook',
  1215. tag: 'input',
  1216. },
  1217. ],
  1218. },
  1219. preferences: {
  1220. render: true,
  1221. placeholder: true,
  1222. authentication: true,
  1223. permission: ['admin.ticket'],
  1224. },
  1225. state: 'Ticket#',
  1226. frontend: true
  1227. )
  1228. Setting.create_if_not_exists(
  1229. title: 'Ticket Hook Divider',
  1230. name: 'ticket_hook_divider',
  1231. area: 'Ticket::Base::Shadow',
  1232. description: 'The divider between TicketHook and ticket number. E. g. \': \'.',
  1233. options: {
  1234. form: [
  1235. {
  1236. display: '',
  1237. null: true,
  1238. name: 'ticket_hook_divider',
  1239. tag: 'input',
  1240. },
  1241. ],
  1242. },
  1243. state: '',
  1244. preferences: {
  1245. permission: ['admin.ticket'],
  1246. },
  1247. frontend: false
  1248. )
  1249. Setting.create_if_not_exists(
  1250. title: 'Ticket Hook Position',
  1251. name: 'ticket_hook_position',
  1252. area: 'Ticket::Base',
  1253. description: "The format of the subject.
  1254. * **Right** means **Some Subject [Ticket#12345]**
  1255. * **Left** means **[Ticket#12345] Some Subject**
  1256. * **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.",
  1257. options: {
  1258. form: [
  1259. {
  1260. display: '',
  1261. null: true,
  1262. name: 'ticket_hook_position',
  1263. tag: 'select',
  1264. translate: true,
  1265. options: {
  1266. 'left' => 'left',
  1267. 'right' => 'right',
  1268. 'none' => 'none',
  1269. },
  1270. },
  1271. ],
  1272. },
  1273. state: 'right',
  1274. preferences: {
  1275. controller: 'SettingsAreaTicketHookPosition',
  1276. permission: ['admin.ticket'],
  1277. },
  1278. frontend: false
  1279. )
  1280. Setting.create_if_not_exists(
  1281. title: 'Ticket Number Format',
  1282. name: 'ticket_number',
  1283. area: 'Ticket::Number',
  1284. description: "Selects the ticket number generator module.
  1285. * **Increment** increments the ticket number, the SystemID and the counter are used with SystemID.Counter format (e.g. 1010138, 1010139).
  1286. * 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).",
  1287. options: {
  1288. form: [
  1289. {
  1290. display: '',
  1291. null: true,
  1292. name: 'ticket_number',
  1293. tag: 'select',
  1294. translate: true,
  1295. options: {
  1296. 'Ticket::Number::Increment' => 'Increment (SystemID.Counter)',
  1297. 'Ticket::Number::Date' => 'Date (Year.Month.Day.SystemID.Counter)',
  1298. },
  1299. },
  1300. ],
  1301. },
  1302. state: 'Ticket::Number::Increment',
  1303. preferences: {
  1304. settings_included: %w(ticket_number_increment ticket_number_date),
  1305. controller: 'SettingsAreaTicketNumber',
  1306. permission: ['admin.ticket'],
  1307. },
  1308. frontend: false
  1309. )
  1310. Setting.create_if_not_exists(
  1311. title: 'Ticket Number Increment',
  1312. name: 'ticket_number_increment',
  1313. area: 'Ticket::Number',
  1314. description: '-',
  1315. options: {
  1316. form: [
  1317. {
  1318. display: 'Checksum',
  1319. null: true,
  1320. name: 'checksum',
  1321. tag: 'boolean',
  1322. options: {
  1323. true => 'yes',
  1324. false => 'no',
  1325. },
  1326. },
  1327. {
  1328. display: 'Min. size of number',
  1329. null: true,
  1330. name: 'min_size',
  1331. tag: 'select',
  1332. options: {
  1333. 1 => ' 1',
  1334. 2 => ' 2',
  1335. 3 => ' 3',
  1336. 4 => ' 4',
  1337. 5 => ' 5',
  1338. 6 => ' 6',
  1339. 7 => ' 7',
  1340. 8 => ' 8',
  1341. 9 => ' 9',
  1342. 10 => '10',
  1343. 11 => '11',
  1344. 12 => '12',
  1345. 13 => '13',
  1346. 14 => '14',
  1347. 15 => '15',
  1348. 16 => '16',
  1349. 17 => '17',
  1350. 18 => '18',
  1351. 19 => '19',
  1352. 20 => '20',
  1353. },
  1354. },
  1355. ],
  1356. },
  1357. state: {
  1358. checksum: false,
  1359. min_size: 5,
  1360. },
  1361. preferences: {
  1362. permission: ['admin.ticket'],
  1363. hidden: true,
  1364. },
  1365. frontend: false
  1366. )
  1367. Setting.create_if_not_exists(
  1368. title: 'Ticket Number Increment Date',
  1369. name: 'ticket_number_date',
  1370. area: 'Ticket::Number',
  1371. description: '-',
  1372. options: {
  1373. form: [
  1374. {
  1375. display: 'Checksum',
  1376. null: true,
  1377. name: 'checksum',
  1378. tag: 'boolean',
  1379. options: {
  1380. true => 'yes',
  1381. false => 'no',
  1382. },
  1383. },
  1384. ],
  1385. },
  1386. state: {
  1387. checksum: false
  1388. },
  1389. preferences: {
  1390. permission: ['admin.ticket'],
  1391. hidden: true,
  1392. },
  1393. frontend: false
  1394. )
  1395. Setting.create_if_not_exists(
  1396. title: 'Enable Ticket creation',
  1397. name: 'customer_ticket_create',
  1398. area: 'CustomerWeb::Base',
  1399. description: 'Defines if a customer can create tickets via the web interface.',
  1400. options: {
  1401. form: [
  1402. {
  1403. display: '',
  1404. null: true,
  1405. name: 'customer_ticket_create',
  1406. tag: 'boolean',
  1407. options: {
  1408. true => 'yes',
  1409. false => 'no',
  1410. },
  1411. },
  1412. ],
  1413. },
  1414. state: true,
  1415. preferences: {
  1416. authentication: true,
  1417. permission: ['admin.channel_web'],
  1418. },
  1419. frontend: true
  1420. )
  1421. Setting.create_if_not_exists(
  1422. title: 'Group selection for Ticket creation',
  1423. name: 'customer_ticket_create_group_ids',
  1424. area: 'CustomerWeb::Base',
  1425. description: 'Defines groups for which a customer can create tickets via web interface. "-" means all groups are available.',
  1426. options: {
  1427. form: [
  1428. {
  1429. display: '',
  1430. null: true,
  1431. name: 'group_ids',
  1432. tag: 'select',
  1433. multiple: true,
  1434. nulloption: true,
  1435. relation: 'Group',
  1436. },
  1437. ],
  1438. },
  1439. state: '',
  1440. preferences: {
  1441. authentication: true,
  1442. permission: ['admin.channel_web'],
  1443. },
  1444. frontend: true
  1445. )
  1446. Setting.create_if_not_exists(
  1447. title: 'Enable Ticket creation',
  1448. name: 'form_ticket_create',
  1449. area: 'Form::Base',
  1450. description: 'Defines if tickets can be created via web form.',
  1451. options: {
  1452. form: [
  1453. {
  1454. display: '',
  1455. null: true,
  1456. name: 'form_ticket_create',
  1457. tag: 'boolean',
  1458. options: {
  1459. true => 'yes',
  1460. false => 'no',
  1461. },
  1462. },
  1463. ],
  1464. },
  1465. state: false,
  1466. preferences: {
  1467. permission: ['admin.channel_formular'],
  1468. },
  1469. frontend: false,
  1470. )
  1471. Setting.create_if_not_exists(
  1472. title: 'Ticket Subject Size',
  1473. name: 'ticket_subject_size',
  1474. area: 'Email::Base',
  1475. description: 'Max. length of the subject in an email reply.',
  1476. options: {
  1477. form: [
  1478. {
  1479. display: '',
  1480. null: false,
  1481. name: 'ticket_subject_size',
  1482. tag: 'input',
  1483. },
  1484. ],
  1485. },
  1486. state: '110',
  1487. preferences: {
  1488. permission: ['admin.channel_email'],
  1489. },
  1490. frontend: false
  1491. )
  1492. Setting.create_if_not_exists(
  1493. title: 'Ticket Subject Reply',
  1494. name: 'ticket_subject_re',
  1495. area: 'Email::Base',
  1496. description: 'The text at the beginning of the subject in an email reply, e. g. RE, AW, or AS.',
  1497. options: {
  1498. form: [
  1499. {
  1500. display: '',
  1501. null: true,
  1502. name: 'ticket_subject_re',
  1503. tag: 'input',
  1504. },
  1505. ],
  1506. },
  1507. state: 'RE',
  1508. preferences: {
  1509. permission: ['admin.channel_email'],
  1510. },
  1511. frontend: false
  1512. )
  1513. Setting.create_if_not_exists(
  1514. title: 'Sender Format',
  1515. name: 'ticket_define_email_from',
  1516. area: 'Email::Base',
  1517. description: 'Defines how the From field of emails (sent from answers and email tickets) should look like.',
  1518. options: {
  1519. form: [
  1520. {
  1521. display: '',
  1522. null: true,
  1523. name: 'ticket_define_email_from',
  1524. tag: 'select',
  1525. options: {
  1526. SystemAddressName: 'System Address Display Name',
  1527. AgentNameSystemAddressName: 'Agent Name + FromSeparator + System Address Display Name',
  1528. },
  1529. },
  1530. ],
  1531. },
  1532. state: 'AgentNameSystemAddressName',
  1533. preferences: {
  1534. permission: ['admin.channel_email'],
  1535. },
  1536. frontend: false
  1537. )
  1538. Setting.create_if_not_exists(
  1539. title: 'Sender Format Separator',
  1540. name: 'ticket_define_email_from_separator',
  1541. area: 'Email::Base',
  1542. description: 'Defines the separator between the agent\'s real name and the given group email address.',
  1543. options: {
  1544. form: [
  1545. {
  1546. display: '',
  1547. null: false,
  1548. name: 'ticket_define_email_from_separator',
  1549. tag: 'input',
  1550. },
  1551. ],
  1552. },
  1553. state: 'via',
  1554. preferences: {
  1555. permission: ['admin.channel_email'],
  1556. },
  1557. frontend: false
  1558. )
  1559. Setting.create_if_not_exists(
  1560. title: 'Maximum Email Size',
  1561. name: 'postmaster_max_size',
  1562. area: 'Email::Base',
  1563. description: 'Maximum size in MB of emails.',
  1564. options: {
  1565. form: [
  1566. {
  1567. display: '',
  1568. null: true,
  1569. name: 'postmaster_max_size',
  1570. tag: 'select',
  1571. options: {
  1572. 1 => ' 1',
  1573. 2 => ' 2',
  1574. 3 => ' 3',
  1575. 4 => ' 4',
  1576. 5 => ' 5',
  1577. 6 => ' 6',
  1578. 7 => ' 7',
  1579. 8 => ' 8',
  1580. 9 => ' 9',
  1581. 10 => ' 10',
  1582. 15 => ' 15',
  1583. 20 => ' 20',
  1584. 25 => ' 25',
  1585. 30 => ' 30',
  1586. 35 => ' 35',
  1587. 40 => ' 40',
  1588. 45 => ' 45',
  1589. 50 => ' 50',
  1590. 60 => ' 60',
  1591. 70 => ' 70',
  1592. 80 => ' 80',
  1593. 90 => ' 90',
  1594. 100 => '100',
  1595. 125 => '125',
  1596. 150 => '150',
  1597. },
  1598. },
  1599. ],
  1600. },
  1601. state: 10,
  1602. preferences: {
  1603. online_service_disable: true,
  1604. permission: ['admin.channel_email'],
  1605. },
  1606. frontend: false
  1607. )
  1608. Setting.create_if_not_exists(
  1609. title: 'Additional follow-up detection',
  1610. name: 'postmaster_follow_up_search_in',
  1611. area: 'Email::Base',
  1612. 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.',
  1613. options: {
  1614. form: [
  1615. {
  1616. display: '',
  1617. null: true,
  1618. name: 'postmaster_follow_up_search_in',
  1619. tag: 'checkbox',
  1620. options: {
  1621. 'references' => 'References - Search for follow up also in In-Reply-To or References headers.',
  1622. 'body' => 'Body - Search for follow up also in mail body.',
  1623. 'attachment' => 'Attachment - Search for follow up also in attachments.',
  1624. },
  1625. },
  1626. ],
  1627. },
  1628. state: [],
  1629. preferences: {
  1630. permission: ['admin.channel_email'],
  1631. },
  1632. frontend: false
  1633. )
  1634. Setting.create_if_not_exists(
  1635. title: 'Sender based on Reply-To header',
  1636. name: 'postmaster_sender_based_on_reply_to',
  1637. area: 'Email::Base',
  1638. 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.',
  1639. options: {
  1640. form: [
  1641. {
  1642. display: '',
  1643. null: true,
  1644. name: 'postmaster_sender_based_on_reply_to',
  1645. tag: 'select',
  1646. options: {
  1647. '' => '-',
  1648. 'as_sender_of_email' => 'Take reply-to header as sender/from of email.',
  1649. 'as_sender_of_email_use_from_realname' => 'Take reply-to header as sender/from of email and use realname of origin from.',
  1650. },
  1651. },
  1652. ],
  1653. },
  1654. state: [],
  1655. preferences: {
  1656. permission: ['admin.channel_email'],
  1657. },
  1658. frontend: false
  1659. )
  1660. Setting.create_if_not_exists(
  1661. title: 'Notification Sender',
  1662. name: 'notification_sender',
  1663. area: 'Email::Base',
  1664. description: 'Defines the sender of email notifications.',
  1665. options: {
  1666. form: [
  1667. {
  1668. display: '',
  1669. null: false,
  1670. name: 'notification_sender',
  1671. tag: 'input',
  1672. },
  1673. ],
  1674. },
  1675. state: 'Notification Master <noreply@#{config.fqdn}>',
  1676. preferences: {
  1677. online_service_disable: true,
  1678. permission: ['admin.channel_email'],
  1679. },
  1680. frontend: false
  1681. )
  1682. Setting.create_if_not_exists(
  1683. title: 'Block Notifications',
  1684. name: 'send_no_auto_response_reg_exp',
  1685. area: 'Email::Base',
  1686. description: 'If this regex matches, no notification will be sent by the sender.',
  1687. options: {
  1688. form: [
  1689. {
  1690. display: '',
  1691. null: false,
  1692. name: 'send_no_auto_response_reg_exp',
  1693. tag: 'input',
  1694. },
  1695. ],
  1696. },
  1697. state: '(mailer-daemon|postmaster|abuse|root|noreply|noreply.+?|no-reply|no-reply.+?)@.+?\..+?',
  1698. preferences: {
  1699. online_service_disable: true,
  1700. permission: ['admin.channel_email'],
  1701. },
  1702. frontend: false
  1703. )
  1704. Setting.create_if_not_exists(
  1705. title: 'API Token Access',
  1706. name: 'api_token_access',
  1707. area: 'API::Base',
  1708. description: 'Enable REST API using tokens (not username/email address and password). Each user needs to create its own access tokens in user profile.',
  1709. options: {
  1710. form: [
  1711. {
  1712. display: '',
  1713. null: true,
  1714. name: 'api_token_access',
  1715. tag: 'boolean',
  1716. options: {
  1717. true => 'yes',
  1718. false => 'no',
  1719. },
  1720. },
  1721. ],
  1722. },
  1723. state: true,
  1724. preferences: {
  1725. permission: ['admin.api'],
  1726. },
  1727. frontend: false
  1728. )
  1729. Setting.create_if_not_exists(
  1730. title: 'API Password Access',
  1731. name: 'api_password_access',
  1732. area: 'API::Base',
  1733. description: 'Enable REST API access using the username/email address and password for the authentication user.',
  1734. options: {
  1735. form: [
  1736. {
  1737. display: '',
  1738. null: true,
  1739. name: 'api_password_access',
  1740. tag: 'boolean',
  1741. options: {
  1742. true => 'yes',
  1743. false => 'no',
  1744. },
  1745. },
  1746. ],
  1747. },
  1748. state: true,
  1749. preferences: {
  1750. permission: ['admin.api'],
  1751. },
  1752. frontend: false
  1753. )
  1754. Setting.create_if_not_exists(
  1755. title: 'Monitoring Token',
  1756. name: 'monitoring_token',
  1757. area: 'HealthCheck::Base',
  1758. description: 'Token for monitoring.',
  1759. options: {
  1760. form: [
  1761. {
  1762. display: '',
  1763. null: false,
  1764. name: 'monitoring_token',
  1765. tag: 'input',
  1766. },
  1767. ],
  1768. },
  1769. state: SecureRandom.urlsafe_base64(40),
  1770. preferences: {
  1771. permission: ['admin.monitoring'],
  1772. },
  1773. frontend: false
  1774. )
  1775. Setting.create_if_not_exists(
  1776. title: 'Enable Chat',
  1777. name: 'chat',
  1778. area: 'Chat::Base',
  1779. description: 'Enable/disable online chat.',
  1780. options: {
  1781. form: [
  1782. {
  1783. display: '',
  1784. null: true,
  1785. name: 'chat',
  1786. tag: 'boolean',
  1787. options: {
  1788. true => 'yes',
  1789. false => 'no',
  1790. },
  1791. },
  1792. ],
  1793. },
  1794. preferences: {
  1795. trigger: ['menu:render', 'chat:rerender'],
  1796. permission: ['admin.channel_chat'],
  1797. },
  1798. state: false,
  1799. frontend: true
  1800. )
  1801. Setting.create_if_not_exists(
  1802. title: 'Agent idle timeout',
  1803. name: 'chat_agent_idle_timeout',
  1804. area: 'Chat::Extended',
  1805. description: 'Idle timeout in seconds until agent is set offline automatically.',
  1806. options: {
  1807. form: [
  1808. {
  1809. display: '',
  1810. null: false,
  1811. name: 'chat_agent_idle_timeout',
  1812. tag: 'input',
  1813. },
  1814. ],
  1815. },
  1816. state: '120',
  1817. preferences: {
  1818. permission: ['admin.channel_chat'],
  1819. },
  1820. frontend: true
  1821. )
  1822. Setting.create_if_not_exists(
  1823. title: 'Defines searchable models.',
  1824. name: 'models_searchable',
  1825. area: 'Models::Base',
  1826. description: 'Defines the searchable models.',
  1827. options: {},
  1828. state: [],
  1829. preferences: {
  1830. authentication: true,
  1831. },
  1832. frontend: true,
  1833. )
  1834. Setting.create_if_not_exists(
  1835. title: 'Default Screen',
  1836. name: 'default_controller',
  1837. area: 'Core',
  1838. description: 'Defines the default screen.',
  1839. options: {},
  1840. state: '#dashboard',
  1841. frontend: true
  1842. )
  1843. Setting.create_if_not_exists(
  1844. title: 'Elasticsearch Endpoint URL',
  1845. name: 'es_url',
  1846. area: 'SearchIndex::Elasticsearch',
  1847. description: 'Defines endpoint of Elasticsearch.',
  1848. state: '',
  1849. preferences: { online_service_disable: true },
  1850. frontend: false
  1851. )
  1852. Setting.create_if_not_exists(
  1853. title: 'Elasticsearch Endpoint User',
  1854. name: 'es_user',
  1855. area: 'SearchIndex::Elasticsearch',
  1856. description: 'Defines HTTP basic auth user of Elasticsearch.',
  1857. state: '',
  1858. preferences: { online_service_disable: true },
  1859. frontend: false
  1860. )
  1861. Setting.create_if_not_exists(
  1862. title: 'Elasticsearch Endpoint Password',
  1863. name: 'es_password',
  1864. area: 'SearchIndex::Elasticsearch',
  1865. description: 'Defines HTTP basic auth password of Elasticsearch.',
  1866. state: '',
  1867. preferences: { online_service_disable: true },
  1868. frontend: false
  1869. )
  1870. Setting.create_if_not_exists(
  1871. title: 'Elasticsearch Endpoint Index',
  1872. name: 'es_index',
  1873. area: 'SearchIndex::Elasticsearch',
  1874. description: 'Defines Elasticsearch index name.',
  1875. state: 'zammad',
  1876. preferences: { online_service_disable: true },
  1877. frontend: false
  1878. )
  1879. Setting.create_if_not_exists(
  1880. title: 'Elasticsearch Attachment Extensions',
  1881. name: 'es_attachment_ignore',
  1882. area: 'SearchIndex::Elasticsearch',
  1883. description: 'Defines attachment extensions which will be ignored by Elasticsearch.',
  1884. state: [ '.png', '.jpg', '.jpeg', '.mpeg', '.mpg', '.mov', '.bin', '.exe', '.box', '.mbox' ],
  1885. preferences: { online_service_disable: true },
  1886. frontend: false
  1887. )
  1888. Setting.create_if_not_exists(
  1889. title: 'Elasticsearch Attachment Size',
  1890. name: 'es_attachment_max_size_in_mb',
  1891. area: 'SearchIndex::Elasticsearch',
  1892. description: 'Define max. attachment size for Elasticsearch.',
  1893. state: 50,
  1894. preferences: { online_service_disable: true },
  1895. frontend: false
  1896. )
  1897. Setting.create_if_not_exists(
  1898. title: 'Import Mode',
  1899. name: 'import_mode',
  1900. area: 'Import::Base',
  1901. description: 'Puts Zammad into import mode (disables some triggers).',
  1902. options: {
  1903. form: [
  1904. {
  1905. display: '',
  1906. null: true,
  1907. name: 'import_mode',
  1908. tag: 'boolean',
  1909. options: {
  1910. true => 'yes',
  1911. false => 'no',
  1912. },
  1913. },
  1914. ],
  1915. },
  1916. state: false,
  1917. frontend: true
  1918. )
  1919. Setting.create_if_not_exists(
  1920. title: 'Import Backend',
  1921. name: 'import_backend',
  1922. area: 'Import::Base::Internal',
  1923. description: 'Set backend which is being used for import.',
  1924. options: {},
  1925. state: '',
  1926. frontend: true
  1927. )
  1928. Setting.create_if_not_exists(
  1929. title: 'Ignore Escalation/SLA Information',
  1930. name: 'import_ignore_sla',
  1931. area: 'Import::Base',
  1932. description: 'Ignore escalation/SLA information for import.',
  1933. options: {
  1934. form: [
  1935. {
  1936. display: '',
  1937. null: true,
  1938. name: 'import_ignore_sla',
  1939. tag: 'boolean',
  1940. options: {
  1941. true => 'yes',
  1942. false => 'no',
  1943. },
  1944. },
  1945. ],
  1946. },
  1947. state: false,
  1948. frontend: false
  1949. )
  1950. Setting.create_if_not_exists(
  1951. title: 'Import Endpoint',
  1952. name: 'import_otrs_endpoint',
  1953. area: 'Import::OTRS',
  1954. description: 'Defines OTRS endpoint to import users, tickets, states and articles.',
  1955. options: {
  1956. form: [
  1957. {
  1958. display: '',
  1959. null: false,
  1960. name: 'import_otrs_endpoint',
  1961. tag: 'input',
  1962. },
  1963. ],
  1964. },
  1965. state: 'http://otrs_host/otrs',
  1966. frontend: false
  1967. )
  1968. Setting.create_if_not_exists(
  1969. title: 'Import Key',
  1970. name: 'import_otrs_endpoint_key',
  1971. area: 'Import::OTRS',
  1972. description: 'Defines OTRS endpoint authentication key.',
  1973. options: {
  1974. form: [
  1975. {
  1976. display: '',
  1977. null: false,
  1978. name: 'import_otrs_endpoint_key',
  1979. tag: 'input',
  1980. },
  1981. ],
  1982. },
  1983. state: '',
  1984. frontend: false
  1985. )
  1986. Setting.create_if_not_exists(
  1987. title: 'Import User for HTTP basic authentication',
  1988. name: 'import_otrs_user',
  1989. area: 'Import::OTRS',
  1990. description: 'Defines HTTP basic authentication user (only if OTRS is protected via HTTP basic auth).',
  1991. options: {
  1992. form: [
  1993. {
  1994. display: '',
  1995. null: true,
  1996. name: 'import_otrs_user',
  1997. tag: 'input',
  1998. },
  1999. ],
  2000. },
  2001. state: '',
  2002. frontend: false
  2003. )
  2004. Setting.create_if_not_exists(
  2005. title: 'Import Password for http basic authentication',
  2006. name: 'import_otrs_password',
  2007. area: 'Import::OTRS',
  2008. description: 'Defines http basic authentication password (only if OTRS is protected via http basic auth).',
  2009. options: {
  2010. form: [
  2011. {
  2012. display: '',
  2013. null: true,
  2014. name: 'import_otrs_password',
  2015. tag: 'input',
  2016. },
  2017. ],
  2018. },
  2019. state: '',
  2020. frontend: false
  2021. )
  2022. Setting.create_if_not_exists(
  2023. title: 'Import Endpoint',
  2024. name: 'import_zendesk_endpoint',
  2025. area: 'Import::Zendesk',
  2026. description: 'Defines Zendesk endpoint to import users, ticket, states and articles.',
  2027. options: {
  2028. form: [
  2029. {
  2030. display: '',
  2031. null: false,
  2032. name: 'import_zendesk_endpoint',
  2033. tag: 'input',
  2034. },
  2035. ],
  2036. },
  2037. state: 'https://yours.zendesk.com/api/v2',
  2038. frontend: false
  2039. )
  2040. Setting.create_if_not_exists(
  2041. title: 'Import Key for requesting the Zendesk API',
  2042. name: 'import_zendesk_endpoint_key',
  2043. area: 'Import::Zendesk',
  2044. description: 'Defines Zendesk endpoint authentication key.',
  2045. options: {
  2046. form: [
  2047. {
  2048. display: '',
  2049. null: false,
  2050. name: 'import_zendesk_endpoint_key',
  2051. tag: 'input',
  2052. },
  2053. ],
  2054. },
  2055. state: '',
  2056. frontend: false
  2057. )
  2058. Setting.create_if_not_exists(
  2059. title: 'Import User for requesting the Zendesk API',
  2060. name: 'import_zendesk_endpoint_username',
  2061. area: 'Import::Zendesk',
  2062. description: 'Defines Zendesk endpoint authentication user.',
  2063. options: {
  2064. form: [
  2065. {
  2066. display: '',
  2067. null: true,
  2068. name: 'import_zendesk_endpoint_username',
  2069. tag: 'input',
  2070. },
  2071. ],
  2072. },
  2073. state: '',
  2074. frontend: false
  2075. )
  2076. Setting.create_if_not_exists(
  2077. title: 'Import Backends',
  2078. name: 'import_backends',
  2079. area: 'Import',
  2080. description: 'A list of active import backends that get scheduled automatically.',
  2081. options: {},
  2082. state: ['Import::Ldap'],
  2083. preferences: {
  2084. permission: ['admin'],
  2085. },
  2086. frontend: false
  2087. )
  2088. Setting.create_if_not_exists(
  2089. title: 'Time Accounting',
  2090. name: 'time_accounting',
  2091. area: 'Web::Base',
  2092. description: 'Enable time accounting.',
  2093. options: {
  2094. form: [
  2095. {
  2096. display: '',
  2097. null: true,
  2098. name: 'time_accounting',
  2099. tag: 'boolean',
  2100. options: {
  2101. true => 'yes',
  2102. false => 'no',
  2103. },
  2104. },
  2105. ],
  2106. },
  2107. preferences: {
  2108. authentication: true,
  2109. permission: ['admin.time_accounting'],
  2110. },
  2111. state: false,
  2112. frontend: true
  2113. )
  2114. Setting.create_if_not_exists(
  2115. title: 'Time Accounting Selector',
  2116. name: 'time_accounting_selector',
  2117. area: 'Web::Base',
  2118. description: 'Enable time accounting for these tickets.',
  2119. options: {
  2120. form: [
  2121. {},
  2122. ],
  2123. },
  2124. preferences: {
  2125. authentication: true,
  2126. permission: ['admin.time_accounting'],
  2127. },
  2128. state: {},
  2129. frontend: true
  2130. )
  2131. Setting.create_if_not_exists(
  2132. title: 'New Tags',
  2133. name: 'tag_new',
  2134. area: 'Web::Base',
  2135. description: 'Allow users to create new tags.',
  2136. options: {
  2137. form: [
  2138. {
  2139. display: '',
  2140. null: true,
  2141. name: 'tag_new',
  2142. tag: 'boolean',
  2143. options: {
  2144. true => 'yes',
  2145. false => 'no',
  2146. },
  2147. },
  2148. ],
  2149. },
  2150. preferences: {
  2151. authentication: true,
  2152. permission: ['admin.tag'],
  2153. },
  2154. state: true,
  2155. frontend: true
  2156. )
  2157. Setting.create_if_not_exists(
  2158. title: 'Default calendar tickets subscriptions',
  2159. name: 'defaults_calendar_subscriptions_tickets',
  2160. area: 'Defaults::CalendarSubscriptions',
  2161. description: 'Defines the default calendar tickets subscription settings.',
  2162. options: {},
  2163. state: {
  2164. escalation: {
  2165. own: true,
  2166. not_assigned: false,
  2167. },
  2168. new_open: {
  2169. own: true,
  2170. not_assigned: false,
  2171. },
  2172. pending: {
  2173. own: true,
  2174. not_assigned: false,
  2175. }
  2176. },
  2177. preferences: {
  2178. authentication: true,
  2179. },
  2180. frontend: true
  2181. )
  2182. Setting.create_if_not_exists(
  2183. title: 'Defines translator identifier.',
  2184. name: 'translator_key',
  2185. area: 'i18n::translator_key',
  2186. description: 'Defines the translator identifier for contributions.',
  2187. options: {},
  2188. state: '',
  2189. frontend: false
  2190. )
  2191. Setting.create_if_not_exists(
  2192. title: 'Defines postmaster filter.',
  2193. name: '0010_postmaster_filter_trusted',
  2194. area: 'Postmaster::PreFilter',
  2195. description: 'Defines postmaster filter to remove X-Zammad headers from not trusted sources.',
  2196. options: {},
  2197. state: 'Channel::Filter::Trusted',
  2198. frontend: false
  2199. )
  2200. Setting.create_if_not_exists(
  2201. title: 'Defines postmaster filter.',
  2202. name: '0011_postmaster_sender_based_on_reply_to',
  2203. area: 'Postmaster::PreFilter',
  2204. description: 'Defines postmaster filter to set the sender/from of emails based on reply-to header.',
  2205. options: {},
  2206. state: 'Channel::Filter::ReplyToBasedSender',
  2207. frontend: false
  2208. )
  2209. Setting.create_if_not_exists(
  2210. title: 'Defines postmaster filter.',
  2211. name: '0012_postmaster_filter_sender_is_system_address',
  2212. area: 'Postmaster::PreFilter',
  2213. description: 'Defines postmaster filter to check if email has been created by Zammad itself and will set the article sender.',
  2214. options: {},
  2215. state: 'Channel::Filter::SenderIsSystemAddress',
  2216. frontend: false
  2217. )
  2218. Setting.create_if_not_exists(
  2219. title: 'Defines postmaster filter.',
  2220. name: '0014_postmaster_filter_own_notification_loop_detection',
  2221. area: 'Postmaster::PreFilter',
  2222. description: 'Define postmaster filter to check if email is a own created notification email, then ignore it to prevent email loops.',
  2223. options: {},
  2224. state: 'Channel::Filter::OwnNotificationLoopDetection',
  2225. frontend: false
  2226. )
  2227. Setting.create_if_not_exists(
  2228. title: 'Defines postmaster filter.',
  2229. name: '0015_postmaster_filter_identify_sender',
  2230. area: 'Postmaster::PreFilter',
  2231. description: 'Defines postmaster filter to identify sender user.',
  2232. options: {},
  2233. state: 'Channel::Filter::IdentifySender',
  2234. frontend: false
  2235. )
  2236. Setting.create_if_not_exists(
  2237. title: 'Defines postmaster filter.',
  2238. name: '0020_postmaster_filter_auto_response_check',
  2239. area: 'Postmaster::PreFilter',
  2240. description: 'Defines postmaster filter to identify auto responses to prevent auto replies from Zammad.',
  2241. options: {},
  2242. state: 'Channel::Filter::AutoResponseCheck',
  2243. frontend: false
  2244. )
  2245. Setting.create_if_not_exists(
  2246. title: 'Defines postmaster filter.',
  2247. name: '0030_postmaster_filter_out_of_office_check',
  2248. area: 'Postmaster::PreFilter',
  2249. description: 'Defines postmaster filter to identify out-of-office emails for follow-up detection and keeping current ticket state.',
  2250. options: {},
  2251. state: 'Channel::Filter::OutOfOfficeCheck',
  2252. frontend: false
  2253. )
  2254. Setting.create_if_not_exists(
  2255. title: 'Defines postmaster filter.',
  2256. name: '0100_postmaster_filter_follow_up_check',
  2257. area: 'Postmaster::PreFilter',
  2258. description: 'Defines postmaster filter to identify follow-ups (based on admin settings).',
  2259. options: {},
  2260. state: 'Channel::Filter::FollowUpCheck',
  2261. frontend: false
  2262. )
  2263. Setting.create_if_not_exists(
  2264. title: 'Defines postmaster filter.',
  2265. name: '0110_postmaster_filter_follow_up_merged',
  2266. area: 'Postmaster::PreFilter',
  2267. description: 'Defines postmaster filter to identify follow-up ticket for merged tickets.',
  2268. options: {},
  2269. state: 'Channel::Filter::FollowUpMerged',
  2270. frontend: false
  2271. )
  2272. Setting.create_if_not_exists(
  2273. title: 'Defines postmaster filter.',
  2274. name: '0200_postmaster_filter_follow_up_possible_check',
  2275. area: 'Postmaster::PreFilter',
  2276. description: 'Define postmaster filter to check if follow ups get created (based on admin settings).',
  2277. options: {},
  2278. state: 'Channel::Filter::FollowUpPossibleCheck',
  2279. frontend: false
  2280. )
  2281. Setting.create_if_not_exists(
  2282. title: 'Defines postmaster filter.',
  2283. name: '0900_postmaster_filter_bounce_follow_up_check',
  2284. area: 'Postmaster::PreFilter',
  2285. description: 'Defines postmaster filter to identify postmaster bounced - to handle it as follow-up of the original ticket.',
  2286. options: {},
  2287. state: 'Channel::Filter::BounceFollowUpCheck',
  2288. frontend: false
  2289. )
  2290. Setting.create_if_not_exists(
  2291. title: 'Defines postmaster filter.',
  2292. name: '0950_postmaster_filter_bounce_delivery_permanent_failed',
  2293. area: 'Postmaster::PreFilter',
  2294. description: 'Defines postmaster filter to identify postmaster bounced - disable sending notification on permanent deleivery failed.',
  2295. options: {},
  2296. state: 'Channel::Filter::BounceDeliveryPermanentFailed',
  2297. frontend: false
  2298. )
  2299. Setting.create_if_not_exists(
  2300. title: 'Defines postmaster filter.',
  2301. name: '1000_postmaster_filter_database_check',
  2302. area: 'Postmaster::PreFilter',
  2303. description: 'Defines postmaster filter for filters managed via admin interface.',
  2304. options: {},
  2305. state: 'Channel::Filter::Database',
  2306. frontend: false
  2307. )
  2308. Setting.create_if_not_exists(
  2309. title: 'Defines postmaster filter.',
  2310. name: '5000_postmaster_filter_icinga',
  2311. area: 'Postmaster::PreFilter',
  2312. description: 'Defines postmaster filter to manage Icinga (http://www.icinga.org) emails.',
  2313. options: {},
  2314. state: 'Channel::Filter::Icinga',
  2315. frontend: false
  2316. )
  2317. Setting.create_if_not_exists(
  2318. title: 'Defines postmaster filter.',
  2319. name: '5100_postmaster_filter_nagios',
  2320. area: 'Postmaster::PreFilter',
  2321. description: 'Defines postmaster filter to manage Nagios (http://www.nagios.org) emails.',
  2322. options: {},
  2323. state: 'Channel::Filter::Nagios',
  2324. frontend: false
  2325. )
  2326. Setting.create_if_not_exists(
  2327. title: 'Icinga integration',
  2328. name: 'icinga_integration',
  2329. area: 'Integration::Switch',
  2330. description: 'Defines if Icinga (http://www.icinga.org) is enabled or not.',
  2331. options: {
  2332. form: [
  2333. {
  2334. display: '',
  2335. null: true,
  2336. name: 'icinga_integration',
  2337. tag: 'boolean',
  2338. options: {
  2339. true => 'yes',
  2340. false => 'no',
  2341. },
  2342. },
  2343. ],
  2344. },
  2345. state: false,
  2346. preferences: {
  2347. prio: 1,
  2348. permission: ['admin.integration'],
  2349. },
  2350. frontend: false
  2351. )
  2352. Setting.create_if_not_exists(
  2353. title: 'Sender',
  2354. name: 'icinga_sender',
  2355. area: 'Integration::Icinga',
  2356. description: 'Defines the sender email address of Icinga emails.',
  2357. options: {
  2358. form: [
  2359. {
  2360. display: '',
  2361. null: false,
  2362. name: 'icinga_sender',
  2363. tag: 'input',
  2364. placeholder: 'icinga@monitoring.example.com',
  2365. },
  2366. ],
  2367. },
  2368. state: 'icinga@monitoring.example.com',
  2369. preferences: {
  2370. prio: 2,
  2371. permission: ['admin.integration'],
  2372. },
  2373. frontend: false,
  2374. )
  2375. Setting.create_if_not_exists(
  2376. title: 'Auto close',
  2377. name: 'icinga_auto_close',
  2378. area: 'Integration::Icinga',
  2379. description: 'Defines if tickets should be closed if service is recovered.',
  2380. options: {
  2381. form: [
  2382. {
  2383. display: '',
  2384. null: true,
  2385. name: 'icinga_auto_close',
  2386. tag: 'boolean',
  2387. options: {
  2388. true => 'yes',
  2389. false => 'no',
  2390. },
  2391. },
  2392. ],
  2393. },
  2394. state: true,
  2395. preferences: {
  2396. prio: 3,
  2397. permission: ['admin.integration'],
  2398. },
  2399. frontend: false
  2400. )
  2401. Setting.create_if_not_exists(
  2402. title: 'Auto close state',
  2403. name: 'icinga_auto_close_state_id',
  2404. area: 'Integration::Icinga',
  2405. description: 'Defines the state of auto closed tickets.',
  2406. options: {
  2407. form: [
  2408. {
  2409. display: '',
  2410. null: false,
  2411. name: 'icinga_auto_close_state_id',
  2412. tag: 'select',
  2413. relation: 'TicketState',
  2414. },
  2415. ],
  2416. },
  2417. state: 4,
  2418. preferences: {
  2419. prio: 4,
  2420. permission: ['admin.integration'],
  2421. },
  2422. frontend: false
  2423. )
  2424. Setting.create_if_not_exists(
  2425. title: 'Nagios integration',
  2426. name: 'nagios_integration',
  2427. area: 'Integration::Switch',
  2428. description: 'Defines if Nagios (http://www.nagios.org) is enabled or not.',
  2429. options: {
  2430. form: [
  2431. {
  2432. display: '',
  2433. null: true,
  2434. name: 'nagios_integration',
  2435. tag: 'boolean',
  2436. options: {
  2437. true => 'yes',
  2438. false => 'no',
  2439. },
  2440. },
  2441. ],
  2442. },
  2443. state: false,
  2444. preferences: {
  2445. prio: 1,
  2446. permission: ['admin.integration'],
  2447. },
  2448. frontend: false
  2449. )
  2450. Setting.create_if_not_exists(
  2451. title: 'Sender',
  2452. name: 'nagios_sender',
  2453. area: 'Integration::Nagios',
  2454. description: 'Defines the sender email address of Nagios emails.',
  2455. options: {
  2456. form: [
  2457. {
  2458. display: '',
  2459. null: false,
  2460. name: 'nagios_sender',
  2461. tag: 'input',
  2462. placeholder: 'nagios@monitoring.example.com',
  2463. },
  2464. ],
  2465. },
  2466. state: 'nagios@monitoring.example.com',
  2467. preferences: {
  2468. prio: 2,
  2469. permission: ['admin.integration'],
  2470. },
  2471. frontend: false,
  2472. )
  2473. Setting.create_if_not_exists(
  2474. title: 'Auto close',
  2475. name: 'nagios_auto_close',
  2476. area: 'Integration::Nagios',
  2477. description: 'Defines if tickets should be closed if service is recovered.',
  2478. options: {
  2479. form: [
  2480. {
  2481. display: '',
  2482. null: true,
  2483. name: 'nagios_auto_close',
  2484. tag: 'boolean',
  2485. options: {
  2486. true => 'yes',
  2487. false => 'no',
  2488. },
  2489. },
  2490. ],
  2491. },
  2492. state: true,
  2493. preferences: {
  2494. prio: 3,
  2495. permission: ['admin.integration'],
  2496. },
  2497. frontend: false
  2498. )
  2499. Setting.create_if_not_exists(
  2500. title: 'Auto close state',
  2501. name: 'nagios_auto_close_state_id',
  2502. area: 'Integration::Nagios',
  2503. description: 'Defines the state of auto closed tickets.',
  2504. options: {
  2505. form: [
  2506. {
  2507. display: '',
  2508. null: false,
  2509. name: 'nagios_auto_close_state_id',
  2510. tag: 'select',
  2511. relation: 'TicketState',
  2512. },
  2513. ],
  2514. },
  2515. state: 4,
  2516. preferences: {
  2517. prio: 4,
  2518. permission: ['admin.integration'],
  2519. },
  2520. frontend: false
  2521. )
  2522. Setting.create_if_not_exists(
  2523. title: 'LDAP integration',
  2524. name: 'ldap_integration',
  2525. area: 'Integration::Switch',
  2526. description: 'Defines if LDAP is enabled or not.',
  2527. options: {
  2528. form: [
  2529. {
  2530. display: '',
  2531. null: true,
  2532. name: 'ldap_integration',
  2533. tag: 'boolean',
  2534. options: {
  2535. true => 'yes',
  2536. false => 'no',
  2537. },
  2538. },
  2539. ],
  2540. },
  2541. state: false,
  2542. preferences: {
  2543. prio: 1,
  2544. authentication: true,
  2545. permission: ['admin.integration'],
  2546. },
  2547. frontend: true
  2548. )
  2549. Setting.create_if_not_exists(
  2550. title: 'LDAP config',
  2551. name: 'ldap_config',
  2552. area: 'Integration::LDAP',
  2553. description: 'Defines the LDAP config.',
  2554. options: {},
  2555. state: {},
  2556. preferences: {
  2557. prio: 2,
  2558. permission: ['admin.integration'],
  2559. },
  2560. frontend: false,
  2561. )
  2562. Setting.create_if_not_exists(
  2563. title: 'Defines sync transaction backend.',
  2564. name: '0100_trigger',
  2565. area: 'Transaction::Backend::Sync',
  2566. description: 'Defines the transaction backend to execute triggers.',
  2567. options: {},
  2568. state: 'Transaction::Trigger',
  2569. frontend: false
  2570. )
  2571. Setting.create_if_not_exists(
  2572. title: 'Defines transaction backend.',
  2573. name: '0100_notification',
  2574. area: 'Transaction::Backend::Async',
  2575. description: 'Defines the transaction backend to send agent notifications.',
  2576. options: {},
  2577. state: 'Transaction::Notification',
  2578. frontend: false
  2579. )
  2580. Setting.create_if_not_exists(
  2581. title: 'Defines transaction backend.',
  2582. name: '1000_signature_detection',
  2583. area: 'Transaction::Backend::Async',
  2584. description: 'Defines the transaction backend to detect customer signatures in emails.',
  2585. options: {},
  2586. state: 'Transaction::SignatureDetection',
  2587. frontend: false
  2588. )
  2589. Setting.create_if_not_exists(
  2590. title: 'Defines transaction backend.',
  2591. name: '6000_slack_webhook',
  2592. area: 'Transaction::Backend::Async',
  2593. description: 'Defines the transaction backend which posts messages to Slack (http://www.slack.com).',
  2594. options: {},
  2595. state: 'Transaction::Slack',
  2596. frontend: false
  2597. )
  2598. Setting.create_if_not_exists(
  2599. title: 'Slack integration',
  2600. name: 'slack_integration',
  2601. area: 'Integration::Switch',
  2602. description: 'Defines if Slack (http://www.slack.org) is enabled or not.',
  2603. options: {
  2604. form: [
  2605. {
  2606. display: '',
  2607. null: true,
  2608. name: 'slack_integration',
  2609. tag: 'boolean',
  2610. options: {
  2611. true => 'yes',
  2612. false => 'no',
  2613. },
  2614. },
  2615. ],
  2616. },
  2617. state: false,
  2618. preferences: {
  2619. prio: 1,
  2620. permission: ['admin.integration'],
  2621. },
  2622. frontend: false
  2623. )
  2624. Setting.create_if_not_exists(
  2625. title: 'Slack config',
  2626. name: 'slack_config',
  2627. area: 'Integration::Slack',
  2628. description: 'Defines the slack config.',
  2629. options: {},
  2630. state: {
  2631. items: []
  2632. },
  2633. preferences: {
  2634. prio: 2,
  2635. permission: ['admin.integration'],
  2636. },
  2637. frontend: false,
  2638. )
  2639. Setting.create_if_not_exists(
  2640. title: 'sipgate.io integration',
  2641. name: 'sipgate_integration',
  2642. area: 'Integration::Switch',
  2643. description: 'Defines if sipgate.io (http://www.sipgate.io) is enabled or not.',
  2644. options: {
  2645. form: [
  2646. {
  2647. display: '',
  2648. null: true,
  2649. name: 'sipgate_integration',
  2650. tag: 'boolean',
  2651. options: {
  2652. true => 'yes',
  2653. false => 'no',
  2654. },
  2655. },
  2656. ],
  2657. },
  2658. state: false,
  2659. preferences: {
  2660. prio: 1,
  2661. trigger: ['menu:render', 'cti:reload'],
  2662. authentication: true,
  2663. permission: ['admin.integration'],
  2664. },
  2665. frontend: true
  2666. )
  2667. Setting.create_if_not_exists(
  2668. title: 'sipgate.io config',
  2669. name: 'sipgate_config',
  2670. area: 'Integration::Sipgate',
  2671. description: 'Defines the sipgate.io config.',
  2672. options: {},
  2673. state: {},
  2674. preferences: {
  2675. prio: 2,
  2676. permission: ['admin.integration'],
  2677. },
  2678. frontend: false,
  2679. )
  2680. Setting.create_if_not_exists(
  2681. title: 'Clearbit integration',
  2682. name: 'clearbit_integration',
  2683. area: 'Integration::Switch',
  2684. description: 'Defines if Clearbit (http://www.clearbit.com) is enabled or not.',
  2685. options: {
  2686. form: [
  2687. {
  2688. display: '',
  2689. null: true,
  2690. name: 'clearbit_integration',
  2691. tag: 'boolean',
  2692. options: {
  2693. true => 'yes',
  2694. false => 'no',
  2695. },
  2696. },
  2697. ],
  2698. },
  2699. state: false,
  2700. preferences: {
  2701. prio: 1,
  2702. permission: ['admin.integration'],
  2703. },
  2704. frontend: false
  2705. )
  2706. Setting.create_if_not_exists(
  2707. title: 'Clearbit config',
  2708. name: 'clearbit_config',
  2709. area: 'Integration::Clearbit',
  2710. description: 'Defines the Clearbit config.',
  2711. options: {},
  2712. state: {},
  2713. frontend: false,
  2714. preferences: {
  2715. prio: 2,
  2716. permission: ['admin.integration'],
  2717. },
  2718. )
  2719. Setting.create_if_not_exists(
  2720. title: 'Defines transaction backend.',
  2721. name: '9000_clearbit_enrichment',
  2722. area: 'Transaction::Backend::Async',
  2723. description: 'Defines the transaction backend which will enrich customer and organization information from Clearbit (http://www.clearbit.com).',
  2724. options: {},
  2725. state: 'Transaction::ClearbitEnrichment',
  2726. frontend: false
  2727. )
  2728. Setting.create_if_not_exists(
  2729. title: 'Defines transaction backend.',
  2730. name: '9100_cti_caller_id_detection',
  2731. area: 'Transaction::Backend::Async',
  2732. description: 'Defines the transaction backend which detects caller IDs in objects and store them for CTI lookups.',
  2733. options: {},
  2734. state: 'Transaction::CtiCallerIdDetection',
  2735. frontend: false
  2736. )
  2737. Setting.create_if_not_exists(
  2738. title: 'Defines transaction backend.',
  2739. name: '9200_karma',
  2740. area: 'Transaction::Backend::Async',
  2741. description: 'Defines the transaction backend which creates the karma score.',
  2742. options: {},
  2743. state: 'Transaction::Karma',
  2744. frontend: false
  2745. )
  2746. Setting.create_if_not_exists(
  2747. title: 'Defines karma levels.',
  2748. name: 'karma_levels',
  2749. area: 'Core::Karma',
  2750. description: 'Defines the karma levels.',
  2751. options: {},
  2752. state: [
  2753. {
  2754. name: 'Beginner',
  2755. start: 0,
  2756. end: 499,
  2757. },
  2758. {
  2759. name: 'Newbie',
  2760. start: 500,
  2761. end: 1999,
  2762. },
  2763. {
  2764. name: 'Intermediate',
  2765. start: 2000,
  2766. end: 4999,
  2767. },
  2768. {
  2769. name: 'Professional',
  2770. start: 5000,
  2771. end: 6999,
  2772. },
  2773. {
  2774. name: 'Expert',
  2775. start: 7000,
  2776. end: 8999,
  2777. },
  2778. {
  2779. name: 'Master',
  2780. start: 9000,
  2781. end: 18_999,
  2782. },
  2783. {
  2784. name: 'Evangelist',
  2785. start: 19_000,
  2786. end: 45_999,
  2787. },
  2788. {
  2789. name: 'Hero',
  2790. start: 50_000,
  2791. end: nil,
  2792. },
  2793. ],
  2794. frontend: false
  2795. )
  2796. Setting.create_if_not_exists(
  2797. title: 'Set limit of agents',
  2798. name: 'system_agent_limit',
  2799. area: 'Core::Online',
  2800. description: 'Defines the limit of the agents.',
  2801. options: {},
  2802. state: false,
  2803. preferences: { online_service_disable: true },
  2804. frontend: false
  2805. )