settings.test.defaults.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. const { merge } = require('@overleaf/settings/merge')
  2. let features
  3. const httpAuthUser = 'sharelatex'
  4. const httpAuthPass = 'password'
  5. const httpAuthUsers = {}
  6. httpAuthUsers[httpAuthUser] = httpAuthPass
  7. module.exports = {
  8. catchErrors: false,
  9. clsiCookie: undefined,
  10. cacheStaticAssets: true,
  11. httpAuthUsers,
  12. secureCookie: false,
  13. security: {
  14. sessionSecret: 'static-secret-for-tests',
  15. },
  16. adminDomains: ['example.com'],
  17. statusPageUrl: 'status.example.com',
  18. apis: {
  19. linkedUrlProxy: {
  20. url: process.env.LINKED_URL_PROXY,
  21. },
  22. web: {
  23. user: httpAuthUser,
  24. pass: httpAuthPass,
  25. },
  26. },
  27. // for registration via SL, set enableLegacyRegistration to true
  28. // for registration via Overleaf v1, set enableLegacyLogin to true
  29. // Currently, acceptance tests require enableLegacyRegistration.
  30. enableLegacyRegistration: true,
  31. features: (features = {
  32. v1_free: {
  33. collaborators: 1,
  34. dropbox: false,
  35. versioning: false,
  36. github: true,
  37. gitBridge: true,
  38. templates: false,
  39. references: false,
  40. referencesSearch: false,
  41. mendeley: true,
  42. zotero: true,
  43. compileTimeout: 60,
  44. compileGroup: 'standard',
  45. trackChanges: false,
  46. },
  47. personal: {
  48. collaborators: 1,
  49. dropbox: false,
  50. versioning: false,
  51. github: false,
  52. gitBridge: false,
  53. templates: false,
  54. references: false,
  55. referencesSearch: false,
  56. mendeley: false,
  57. zotero: false,
  58. compileTimeout: 60,
  59. compileGroup: 'standard',
  60. trackChanges: false,
  61. },
  62. collaborator: {
  63. collaborators: 10,
  64. dropbox: true,
  65. versioning: true,
  66. github: true,
  67. gitBridge: true,
  68. templates: true,
  69. references: true,
  70. referencesSearch: true,
  71. mendeley: true,
  72. zotero: true,
  73. compileTimeout: 180,
  74. compileGroup: 'priority',
  75. trackChanges: true,
  76. },
  77. professional: {
  78. collaborators: -1,
  79. dropbox: true,
  80. versioning: true,
  81. github: true,
  82. gitBridge: true,
  83. templates: true,
  84. references: true,
  85. referencesSearch: true,
  86. mendeley: true,
  87. zotero: true,
  88. compileTimeout: 180,
  89. compileGroup: 'priority',
  90. trackChanges: true,
  91. },
  92. }),
  93. defaultFeatures: features.personal,
  94. defaultPlanCode: 'personal',
  95. institutionPlanCode: 'professional',
  96. plans: [
  97. {
  98. planCode: 'v1_free',
  99. name: 'V1 Free',
  100. price: 0,
  101. features: features.v1_free,
  102. },
  103. {
  104. planCode: 'personal',
  105. name: 'Personal',
  106. price: 0,
  107. features: features.personal,
  108. },
  109. {
  110. planCode: 'collaborator',
  111. name: 'Collaborator',
  112. price: 1500,
  113. features: features.collaborator,
  114. },
  115. {
  116. planCode: 'professional',
  117. name: 'Professional',
  118. price: 3000,
  119. features: features.professional,
  120. },
  121. ],
  122. bonus_features: {
  123. 1: {
  124. collaborators: 2,
  125. dropbox: false,
  126. versioning: false,
  127. },
  128. 3: {
  129. collaborators: 4,
  130. dropbox: false,
  131. versioning: false,
  132. },
  133. 6: {
  134. collaborators: 4,
  135. dropbox: true,
  136. versioning: true,
  137. },
  138. 9: {
  139. collaborators: -1,
  140. dropbox: true,
  141. versioning: true,
  142. },
  143. },
  144. redirects: {
  145. '/redirect/one': '/destination/one',
  146. '/redirect/get_and_post': {
  147. methods: ['get', 'post'],
  148. url: '/destination/get_and_post',
  149. },
  150. '/redirect/base_url': {
  151. baseUrl: 'https://example.com',
  152. url: '/destination/base_url',
  153. },
  154. '/redirect/params/:id': {
  155. url(params) {
  156. return `/destination/${params.id}/params`
  157. },
  158. },
  159. '/redirect/qs': '/destination/qs',
  160. '/docs_v1': {
  161. url: '/docs',
  162. },
  163. },
  164. reconfirmNotificationDays: 14,
  165. unsupportedBrowsers: {
  166. ie: '<=11',
  167. },
  168. // No email in tests
  169. email: undefined,
  170. test: {
  171. counterInit: 0,
  172. },
  173. }
  174. module.exports.mergeWith = function (overrides) {
  175. return merge(overrides, module.exports)
  176. }