@saltcorn/server 0.6.2-beta.1 → 0.6.2-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (374) hide show
  1. package/app.js +9 -13
  2. package/auth/admin.js +8 -24
  3. package/auth/roleadmin.js +6 -16
  4. package/auth/routes.js +113 -59
  5. package/locales/en.json +30 -1
  6. package/markup/admin.js +17 -0
  7. package/package.json +17 -8
  8. package/public/ckeditor/adapters/jquery.js +10 -0
  9. package/public/ckeditor/ckeditor.js +1286 -0
  10. package/public/ckeditor/config.js +38 -0
  11. package/public/ckeditor/contents.css +208 -0
  12. package/public/ckeditor/lang/af.js +5 -0
  13. package/public/ckeditor/lang/ar.js +5 -0
  14. package/public/ckeditor/lang/az.js +5 -0
  15. package/public/ckeditor/lang/bg.js +5 -0
  16. package/public/ckeditor/lang/bn.js +5 -0
  17. package/public/ckeditor/lang/bs.js +5 -0
  18. package/public/ckeditor/lang/ca.js +5 -0
  19. package/public/ckeditor/lang/cs.js +5 -0
  20. package/public/ckeditor/lang/cy.js +5 -0
  21. package/public/ckeditor/lang/da.js +5 -0
  22. package/public/ckeditor/lang/de-ch.js +5 -0
  23. package/public/ckeditor/lang/de.js +5 -0
  24. package/public/ckeditor/lang/el.js +5 -0
  25. package/public/ckeditor/lang/en-au.js +5 -0
  26. package/public/ckeditor/lang/en-ca.js +5 -0
  27. package/public/ckeditor/lang/en-gb.js +5 -0
  28. package/public/ckeditor/lang/en.js +5 -0
  29. package/public/ckeditor/lang/eo.js +5 -0
  30. package/public/ckeditor/lang/es-mx.js +5 -0
  31. package/public/ckeditor/lang/es.js +5 -0
  32. package/public/ckeditor/lang/et.js +5 -0
  33. package/public/ckeditor/lang/eu.js +5 -0
  34. package/public/ckeditor/lang/fa.js +5 -0
  35. package/public/ckeditor/lang/fi.js +5 -0
  36. package/public/ckeditor/lang/fo.js +5 -0
  37. package/public/ckeditor/lang/fr-ca.js +5 -0
  38. package/public/ckeditor/lang/fr.js +5 -0
  39. package/public/ckeditor/lang/gl.js +5 -0
  40. package/public/ckeditor/lang/gu.js +5 -0
  41. package/public/ckeditor/lang/he.js +5 -0
  42. package/public/ckeditor/lang/hi.js +5 -0
  43. package/public/ckeditor/lang/hr.js +5 -0
  44. package/public/ckeditor/lang/hu.js +5 -0
  45. package/public/ckeditor/lang/id.js +5 -0
  46. package/public/ckeditor/lang/is.js +5 -0
  47. package/public/ckeditor/lang/it.js +5 -0
  48. package/public/ckeditor/lang/ja.js +5 -0
  49. package/public/ckeditor/lang/ka.js +5 -0
  50. package/public/ckeditor/lang/km.js +5 -0
  51. package/public/ckeditor/lang/ko.js +5 -0
  52. package/public/ckeditor/lang/ku.js +5 -0
  53. package/public/ckeditor/lang/lt.js +5 -0
  54. package/public/ckeditor/lang/lv.js +5 -0
  55. package/public/ckeditor/lang/mk.js +5 -0
  56. package/public/ckeditor/lang/mn.js +5 -0
  57. package/public/ckeditor/lang/ms.js +5 -0
  58. package/public/ckeditor/lang/nb.js +5 -0
  59. package/public/ckeditor/lang/nl.js +5 -0
  60. package/public/ckeditor/lang/no.js +5 -0
  61. package/public/ckeditor/lang/oc.js +5 -0
  62. package/public/ckeditor/lang/pl.js +5 -0
  63. package/public/ckeditor/lang/pt-br.js +5 -0
  64. package/public/ckeditor/lang/pt.js +5 -0
  65. package/public/ckeditor/lang/ro.js +5 -0
  66. package/public/ckeditor/lang/ru.js +5 -0
  67. package/public/ckeditor/lang/si.js +5 -0
  68. package/public/ckeditor/lang/sk.js +5 -0
  69. package/public/ckeditor/lang/sl.js +5 -0
  70. package/public/ckeditor/lang/sq.js +5 -0
  71. package/public/ckeditor/lang/sr-latn.js +5 -0
  72. package/public/ckeditor/lang/sr.js +5 -0
  73. package/public/ckeditor/lang/sv.js +5 -0
  74. package/public/ckeditor/lang/th.js +5 -0
  75. package/public/ckeditor/lang/tr.js +5 -0
  76. package/public/ckeditor/lang/tt.js +5 -0
  77. package/public/ckeditor/lang/ug.js +5 -0
  78. package/public/ckeditor/lang/uk.js +5 -0
  79. package/public/ckeditor/lang/vi.js +5 -0
  80. package/public/ckeditor/lang/zh-cn.js +5 -0
  81. package/public/ckeditor/lang/zh.js +5 -0
  82. package/public/ckeditor/plugins/a11yhelp/dialogs/a11yhelp.js +10 -0
  83. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/_translationstatus.txt +25 -0
  84. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/af.js +11 -0
  85. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ar.js +11 -0
  86. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/az.js +11 -0
  87. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/bg.js +11 -0
  88. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ca.js +13 -0
  89. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cs.js +12 -0
  90. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +11 -0
  91. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/da.js +11 -0
  92. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de-ch.js +13 -0
  93. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/de.js +13 -0
  94. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/el.js +13 -0
  95. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-au.js +11 -0
  96. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en-gb.js +11 -0
  97. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/en.js +11 -0
  98. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eo.js +13 -0
  99. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es-mx.js +13 -0
  100. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/es.js +13 -0
  101. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/et.js +11 -0
  102. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/eu.js +12 -0
  103. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fa.js +11 -0
  104. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +11 -0
  105. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fo.js +11 -0
  106. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr-ca.js +11 -0
  107. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/fr.js +13 -0
  108. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gl.js +12 -0
  109. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/gu.js +11 -0
  110. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/he.js +11 -0
  111. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hi.js +11 -0
  112. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hr.js +11 -0
  113. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/hu.js +12 -0
  114. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/id.js +11 -0
  115. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/it.js +13 -0
  116. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ja.js +9 -0
  117. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/km.js +11 -0
  118. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ko.js +10 -0
  119. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ku.js +11 -0
  120. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lt.js +11 -0
  121. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/lv.js +12 -0
  122. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mk.js +11 -0
  123. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/mn.js +11 -0
  124. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nb.js +12 -0
  125. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/nl.js +12 -0
  126. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/no.js +11 -0
  127. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/oc.js +12 -0
  128. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pl.js +13 -0
  129. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt-br.js +13 -0
  130. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/pt.js +12 -0
  131. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ro.js +12 -0
  132. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ru.js +11 -0
  133. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/si.js +10 -0
  134. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sk.js +11 -0
  135. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sl.js +11 -0
  136. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sq.js +12 -0
  137. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr-latn.js +12 -0
  138. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sr.js +12 -0
  139. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/sv.js +11 -0
  140. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/th.js +11 -0
  141. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tr.js +12 -0
  142. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/tt.js +11 -0
  143. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/ug.js +12 -0
  144. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/uk.js +12 -0
  145. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/vi.js +11 -0
  146. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +9 -0
  147. package/public/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +9 -0
  148. package/public/ckeditor/plugins/about/dialogs/about.js +8 -0
  149. package/public/ckeditor/plugins/about/dialogs/hidpi/logo_ckeditor.png +0 -0
  150. package/public/ckeditor/plugins/about/dialogs/logo_ckeditor.png +0 -0
  151. package/public/ckeditor/plugins/clipboard/dialogs/paste.js +11 -0
  152. package/public/ckeditor/plugins/dialog/dialogDefinition.js +4 -0
  153. package/public/ckeditor/plugins/dialog/styles/dialog.css +18 -0
  154. package/public/ckeditor/plugins/icons.png +0 -0
  155. package/public/ckeditor/plugins/icons_hidpi.png +0 -0
  156. package/public/ckeditor/plugins/image/dialogs/image.js +44 -0
  157. package/public/ckeditor/plugins/image/images/noimage.png +0 -0
  158. package/public/ckeditor/plugins/link/dialogs/anchor.js +8 -0
  159. package/public/ckeditor/plugins/link/dialogs/link.js +30 -0
  160. package/public/ckeditor/plugins/link/images/anchor.png +0 -0
  161. package/public/ckeditor/plugins/link/images/hidpi/anchor.png +0 -0
  162. package/public/ckeditor/plugins/magicline/images/hidpi/icon-rtl.png +0 -0
  163. package/public/ckeditor/plugins/magicline/images/hidpi/icon.png +0 -0
  164. package/public/ckeditor/plugins/magicline/images/icon-rtl.png +0 -0
  165. package/public/ckeditor/plugins/magicline/images/icon.png +0 -0
  166. package/public/ckeditor/plugins/pastefromgdocs/filter/default.js +8 -0
  167. package/public/ckeditor/plugins/pastefromlibreoffice/filter/default.js +11 -0
  168. package/public/ckeditor/plugins/pastefromword/filter/default.js +42 -0
  169. package/public/ckeditor/plugins/pastetools/filter/common.js +24 -0
  170. package/public/ckeditor/plugins/pastetools/filter/image.js +12 -0
  171. package/public/ckeditor/plugins/scayt/CHANGELOG.md +4 -0
  172. package/public/ckeditor/plugins/scayt/LICENSE.md +28 -0
  173. package/public/ckeditor/plugins/scayt/README.md +81 -0
  174. package/public/ckeditor/plugins/scayt/dialogs/dialog.css +23 -0
  175. package/public/ckeditor/plugins/scayt/dialogs/options.js +32 -0
  176. package/public/ckeditor/plugins/scayt/dialogs/toolbar.css +71 -0
  177. package/public/ckeditor/plugins/scayt/skins/moono-lisa/scayt.css +25 -0
  178. package/public/ckeditor/plugins/specialchar/dialogs/lang/_translationstatus.txt +20 -0
  179. package/public/ckeditor/plugins/specialchar/dialogs/lang/af.js +13 -0
  180. package/public/ckeditor/plugins/specialchar/dialogs/lang/ar.js +13 -0
  181. package/public/ckeditor/plugins/specialchar/dialogs/lang/az.js +10 -0
  182. package/public/ckeditor/plugins/specialchar/dialogs/lang/bg.js +13 -0
  183. package/public/ckeditor/plugins/specialchar/dialogs/lang/ca.js +14 -0
  184. package/public/ckeditor/plugins/specialchar/dialogs/lang/cs.js +13 -0
  185. package/public/ckeditor/plugins/specialchar/dialogs/lang/cy.js +14 -0
  186. package/public/ckeditor/plugins/specialchar/dialogs/lang/da.js +11 -0
  187. package/public/ckeditor/plugins/specialchar/dialogs/lang/de-ch.js +13 -0
  188. package/public/ckeditor/plugins/specialchar/dialogs/lang/de.js +13 -0
  189. package/public/ckeditor/plugins/specialchar/dialogs/lang/el.js +13 -0
  190. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-au.js +13 -0
  191. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-ca.js +13 -0
  192. package/public/ckeditor/plugins/specialchar/dialogs/lang/en-gb.js +13 -0
  193. package/public/ckeditor/plugins/specialchar/dialogs/lang/en.js +13 -0
  194. package/public/ckeditor/plugins/specialchar/dialogs/lang/eo.js +12 -0
  195. package/public/ckeditor/plugins/specialchar/dialogs/lang/es-mx.js +13 -0
  196. package/public/ckeditor/plugins/specialchar/dialogs/lang/es.js +13 -0
  197. package/public/ckeditor/plugins/specialchar/dialogs/lang/et.js +11 -0
  198. package/public/ckeditor/plugins/specialchar/dialogs/lang/eu.js +13 -0
  199. package/public/ckeditor/plugins/specialchar/dialogs/lang/fa.js +12 -0
  200. package/public/ckeditor/plugins/specialchar/dialogs/lang/fi.js +13 -0
  201. package/public/ckeditor/plugins/specialchar/dialogs/lang/fr-ca.js +10 -0
  202. package/public/ckeditor/plugins/specialchar/dialogs/lang/fr.js +12 -0
  203. package/public/ckeditor/plugins/specialchar/dialogs/lang/gl.js +13 -0
  204. package/public/ckeditor/plugins/specialchar/dialogs/lang/he.js +12 -0
  205. package/public/ckeditor/plugins/specialchar/dialogs/lang/hr.js +13 -0
  206. package/public/ckeditor/plugins/specialchar/dialogs/lang/hu.js +12 -0
  207. package/public/ckeditor/plugins/specialchar/dialogs/lang/id.js +13 -0
  208. package/public/ckeditor/plugins/specialchar/dialogs/lang/it.js +14 -0
  209. package/public/ckeditor/plugins/specialchar/dialogs/lang/ja.js +9 -0
  210. package/public/ckeditor/plugins/specialchar/dialogs/lang/km.js +13 -0
  211. package/public/ckeditor/plugins/specialchar/dialogs/lang/ko.js +10 -0
  212. package/public/ckeditor/plugins/specialchar/dialogs/lang/ku.js +13 -0
  213. package/public/ckeditor/plugins/specialchar/dialogs/lang/lt.js +13 -0
  214. package/public/ckeditor/plugins/specialchar/dialogs/lang/lv.js +13 -0
  215. package/public/ckeditor/plugins/specialchar/dialogs/lang/nb.js +11 -0
  216. package/public/ckeditor/plugins/specialchar/dialogs/lang/nl.js +13 -0
  217. package/public/ckeditor/plugins/specialchar/dialogs/lang/no.js +11 -0
  218. package/public/ckeditor/plugins/specialchar/dialogs/lang/oc.js +12 -0
  219. package/public/ckeditor/plugins/specialchar/dialogs/lang/pl.js +12 -0
  220. package/public/ckeditor/plugins/specialchar/dialogs/lang/pt-br.js +11 -0
  221. package/public/ckeditor/plugins/specialchar/dialogs/lang/pt.js +13 -0
  222. package/public/ckeditor/plugins/specialchar/dialogs/lang/ro.js +13 -0
  223. package/public/ckeditor/plugins/specialchar/dialogs/lang/ru.js +13 -0
  224. package/public/ckeditor/plugins/specialchar/dialogs/lang/si.js +13 -0
  225. package/public/ckeditor/plugins/specialchar/dialogs/lang/sk.js +13 -0
  226. package/public/ckeditor/plugins/specialchar/dialogs/lang/sl.js +12 -0
  227. package/public/ckeditor/plugins/specialchar/dialogs/lang/sq.js +13 -0
  228. package/public/ckeditor/plugins/specialchar/dialogs/lang/sr-latn.js +13 -0
  229. package/public/ckeditor/plugins/specialchar/dialogs/lang/sr.js +13 -0
  230. package/public/ckeditor/plugins/specialchar/dialogs/lang/sv.js +11 -0
  231. package/public/ckeditor/plugins/specialchar/dialogs/lang/th.js +13 -0
  232. package/public/ckeditor/plugins/specialchar/dialogs/lang/tr.js +12 -0
  233. package/public/ckeditor/plugins/specialchar/dialogs/lang/tt.js +13 -0
  234. package/public/ckeditor/plugins/specialchar/dialogs/lang/ug.js +13 -0
  235. package/public/ckeditor/plugins/specialchar/dialogs/lang/uk.js +12 -0
  236. package/public/ckeditor/plugins/specialchar/dialogs/lang/vi.js +14 -0
  237. package/public/ckeditor/plugins/specialchar/dialogs/lang/zh-cn.js +9 -0
  238. package/public/ckeditor/plugins/specialchar/dialogs/lang/zh.js +9 -0
  239. package/public/ckeditor/plugins/specialchar/dialogs/specialchar.js +14 -0
  240. package/public/ckeditor/plugins/table/dialogs/table.js +22 -0
  241. package/public/ckeditor/plugins/tableselection/styles/tableselection.css +36 -0
  242. package/public/ckeditor/plugins/tabletools/dialogs/tableCell.js +18 -0
  243. package/public/ckeditor/plugins/widget/images/handle.png +0 -0
  244. package/public/ckeditor/plugins/wsc/LICENSE.md +28 -0
  245. package/public/ckeditor/plugins/wsc/README.md +84 -0
  246. package/public/ckeditor/plugins/wsc/dialogs/ciframe.html +66 -0
  247. package/public/ckeditor/plugins/wsc/dialogs/tmpFrameset.html +52 -0
  248. package/public/ckeditor/plugins/wsc/dialogs/wsc.css +82 -0
  249. package/public/ckeditor/plugins/wsc/dialogs/wsc.js +90 -0
  250. package/public/ckeditor/plugins/wsc/dialogs/wsc_ie.js +11 -0
  251. package/public/ckeditor/plugins/wsc/icons/hidpi/spellchecker.png +0 -0
  252. package/public/ckeditor/plugins/wsc/icons/spellchecker.png +0 -0
  253. package/public/ckeditor/plugins/wsc/lang/af.js +2 -0
  254. package/public/ckeditor/plugins/wsc/lang/ar.js +2 -0
  255. package/public/ckeditor/plugins/wsc/lang/bg.js +2 -0
  256. package/public/ckeditor/plugins/wsc/lang/bn.js +2 -0
  257. package/public/ckeditor/plugins/wsc/lang/bs.js +2 -0
  258. package/public/ckeditor/plugins/wsc/lang/ca.js +2 -0
  259. package/public/ckeditor/plugins/wsc/lang/cs.js +2 -0
  260. package/public/ckeditor/plugins/wsc/lang/cy.js +2 -0
  261. package/public/ckeditor/plugins/wsc/lang/da.js +2 -0
  262. package/public/ckeditor/plugins/wsc/lang/de.js +2 -0
  263. package/public/ckeditor/plugins/wsc/lang/el.js +2 -0
  264. package/public/ckeditor/plugins/wsc/lang/en-au.js +2 -0
  265. package/public/ckeditor/plugins/wsc/lang/en-ca.js +2 -0
  266. package/public/ckeditor/plugins/wsc/lang/en-gb.js +2 -0
  267. package/public/ckeditor/plugins/wsc/lang/en.js +2 -0
  268. package/public/ckeditor/plugins/wsc/lang/eo.js +2 -0
  269. package/public/ckeditor/plugins/wsc/lang/es.js +2 -0
  270. package/public/ckeditor/plugins/wsc/lang/et.js +2 -0
  271. package/public/ckeditor/plugins/wsc/lang/eu.js +2 -0
  272. package/public/ckeditor/plugins/wsc/lang/fa.js +2 -0
  273. package/public/ckeditor/plugins/wsc/lang/fi.js +2 -0
  274. package/public/ckeditor/plugins/wsc/lang/fo.js +2 -0
  275. package/public/ckeditor/plugins/wsc/lang/fr-ca.js +2 -0
  276. package/public/ckeditor/plugins/wsc/lang/fr.js +2 -0
  277. package/public/ckeditor/plugins/wsc/lang/gl.js +2 -0
  278. package/public/ckeditor/plugins/wsc/lang/gu.js +2 -0
  279. package/public/ckeditor/plugins/wsc/lang/he.js +2 -0
  280. package/public/ckeditor/plugins/wsc/lang/hi.js +2 -0
  281. package/public/ckeditor/plugins/wsc/lang/hr.js +2 -0
  282. package/public/ckeditor/plugins/wsc/lang/hu.js +2 -0
  283. package/public/ckeditor/plugins/wsc/lang/is.js +2 -0
  284. package/public/ckeditor/plugins/wsc/lang/it.js +2 -0
  285. package/public/ckeditor/plugins/wsc/lang/ja.js +2 -0
  286. package/public/ckeditor/plugins/wsc/lang/ka.js +2 -0
  287. package/public/ckeditor/plugins/wsc/lang/km.js +2 -0
  288. package/public/ckeditor/plugins/wsc/lang/ko.js +2 -0
  289. package/public/ckeditor/plugins/wsc/lang/ku.js +2 -0
  290. package/public/ckeditor/plugins/wsc/lang/lt.js +2 -0
  291. package/public/ckeditor/plugins/wsc/lang/lv.js +2 -0
  292. package/public/ckeditor/plugins/wsc/lang/mk.js +2 -0
  293. package/public/ckeditor/plugins/wsc/lang/mn.js +2 -0
  294. package/public/ckeditor/plugins/wsc/lang/ms.js +2 -0
  295. package/public/ckeditor/plugins/wsc/lang/nb.js +2 -0
  296. package/public/ckeditor/plugins/wsc/lang/nl.js +2 -0
  297. package/public/ckeditor/plugins/wsc/lang/no.js +2 -0
  298. package/public/ckeditor/plugins/wsc/lang/pl.js +2 -0
  299. package/public/ckeditor/plugins/wsc/lang/pt-br.js +2 -0
  300. package/public/ckeditor/plugins/wsc/lang/pt.js +2 -0
  301. package/public/ckeditor/plugins/wsc/lang/ro.js +2 -0
  302. package/public/ckeditor/plugins/wsc/lang/ru.js +2 -0
  303. package/public/ckeditor/plugins/wsc/lang/sk.js +2 -0
  304. package/public/ckeditor/plugins/wsc/lang/sl.js +2 -0
  305. package/public/ckeditor/plugins/wsc/lang/sr-latn.js +2 -0
  306. package/public/ckeditor/plugins/wsc/lang/sr.js +2 -0
  307. package/public/ckeditor/plugins/wsc/lang/sv.js +2 -0
  308. package/public/ckeditor/plugins/wsc/lang/th.js +2 -0
  309. package/public/ckeditor/plugins/wsc/lang/tr.js +2 -0
  310. package/public/ckeditor/plugins/wsc/lang/ug.js +2 -0
  311. package/public/ckeditor/plugins/wsc/lang/uk.js +2 -0
  312. package/public/ckeditor/plugins/wsc/lang/vi.js +2 -0
  313. package/public/ckeditor/plugins/wsc/lang/zh-cn.js +1 -0
  314. package/public/ckeditor/plugins/wsc/lang/zh.js +1 -0
  315. package/public/ckeditor/plugins/wsc/plugin.js +5 -0
  316. package/public/ckeditor/plugins/wsc/skins/moono-lisa/wsc.css +43 -0
  317. package/public/ckeditor/skins/moono-lisa/dialog.css +5 -0
  318. package/public/ckeditor/skins/moono-lisa/dialog_ie.css +5 -0
  319. package/public/ckeditor/skins/moono-lisa/dialog_ie8.css +5 -0
  320. package/public/ckeditor/skins/moono-lisa/dialog_iequirks.css +5 -0
  321. package/public/ckeditor/skins/moono-lisa/editor.css +5 -0
  322. package/public/ckeditor/skins/moono-lisa/editor_gecko.css +5 -0
  323. package/public/ckeditor/skins/moono-lisa/editor_ie.css +5 -0
  324. package/public/ckeditor/skins/moono-lisa/editor_ie8.css +5 -0
  325. package/public/ckeditor/skins/moono-lisa/editor_iequirks.css +5 -0
  326. package/public/ckeditor/skins/moono-lisa/icons.png +0 -0
  327. package/public/ckeditor/skins/moono-lisa/icons_hidpi.png +0 -0
  328. package/public/ckeditor/skins/moono-lisa/images/arrow.png +0 -0
  329. package/public/ckeditor/skins/moono-lisa/images/close.png +0 -0
  330. package/public/ckeditor/skins/moono-lisa/images/hidpi/close.png +0 -0
  331. package/public/ckeditor/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  332. package/public/ckeditor/skins/moono-lisa/images/hidpi/lock.png +0 -0
  333. package/public/ckeditor/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  334. package/public/ckeditor/skins/moono-lisa/images/lock-open.png +0 -0
  335. package/public/ckeditor/skins/moono-lisa/images/lock.png +0 -0
  336. package/public/ckeditor/skins/moono-lisa/images/refresh.png +0 -0
  337. package/public/ckeditor/skins/moono-lisa/images/spinner.gif +0 -0
  338. package/public/ckeditor/skins/moono-lisa/readme.md +46 -0
  339. package/public/ckeditor/styles.js +137 -0
  340. package/public/ckeditor/vendor/promise.js +13 -0
  341. package/public/saltcorn.css +20 -3
  342. package/public/saltcorn.js +3 -0
  343. package/restart_watcher.js +12 -2
  344. package/routes/actions.js +1 -15
  345. package/routes/admin.js +6 -23
  346. package/routes/api.js +51 -60
  347. package/routes/config.js +0 -1
  348. package/routes/crashlog.js +1 -4
  349. package/routes/delete.js +1 -2
  350. package/routes/edit.js +1 -2
  351. package/routes/eventlog.js +2 -15
  352. package/routes/events.js +0 -1
  353. package/routes/fields.js +1 -9
  354. package/routes/files.js +144 -64
  355. package/routes/homepage.js +3 -0
  356. package/routes/infoarch.js +12 -19
  357. package/routes/library.js +1 -4
  358. package/routes/list.js +50 -6
  359. package/routes/menu.js +118 -32
  360. package/routes/packs.js +2 -8
  361. package/routes/page.js +1 -7
  362. package/routes/pageedit.js +18 -30
  363. package/routes/plugins.js +21 -34
  364. package/routes/scapi.js +155 -184
  365. package/routes/search.js +6 -10
  366. package/routes/settings.js +1 -2
  367. package/routes/tables.js +1 -22
  368. package/routes/tenant.js +1 -9
  369. package/routes/utils.js +19 -19
  370. package/routes/view.js +7 -5
  371. package/routes/viewedit.js +18 -29
  372. package/s3storage.js +167 -0
  373. package/tests/admin.test.js +4 -2
  374. package/wrapper.js +5 -1
package/auth/routes.js CHANGED
@@ -13,14 +13,14 @@ const File = require("@saltcorn/data/models/file");
13
13
 
14
14
  const { send_verification_email } = require("@saltcorn/data/models/email");
15
15
  const {
16
- setTenant,
17
16
  error_catcher,
18
17
  loggedIn,
19
18
  csrfField,
19
+ setTenant,
20
20
  } = require("../routes/utils.js");
21
21
  const { getState } = require("@saltcorn/data/db/state");
22
22
  const { send_reset_email } = require("./resetpw");
23
- const { renderForm } = require("@saltcorn/markup");
23
+ const { renderForm, post_btn } = require("@saltcorn/markup");
24
24
  const passport = require("passport");
25
25
  const {
26
26
  a,
@@ -33,7 +33,10 @@ const {
33
33
  form,
34
34
  select,
35
35
  option,
36
+ span,
36
37
  i,
38
+ div,
39
+ code,
37
40
  } = require("@saltcorn/markup/tags");
38
41
  const {
39
42
  available_languages,
@@ -62,8 +65,8 @@ const router = new Router();
62
65
  module.exports = router;
63
66
 
64
67
  /**
65
- * @param {object} req
66
- * @param {boolean} isCreating
68
+ * @param {object} req
69
+ * @param {boolean} isCreating
67
70
  * @returns {Form}
68
71
  */
69
72
  const loginForm = (req, isCreating) => {
@@ -104,7 +107,7 @@ const loginForm = (req, isCreating) => {
104
107
  };
105
108
 
106
109
  /**
107
- * @param {object} req
110
+ * @param {object} req
108
111
  * @returns {Form}
109
112
  */
110
113
  const forgotForm = (req) =>
@@ -128,8 +131,8 @@ const forgotForm = (req) =>
128
131
  });
129
132
 
130
133
  /**
131
- * @param {object} body
132
- * @param {object} req
134
+ * @param {object} body
135
+ * @param {object} req
133
136
  * @returns {Form}
134
137
  */
135
138
  const resetForm = (body, req) => {
@@ -159,8 +162,8 @@ const resetForm = (body, req) => {
159
162
  };
160
163
 
161
164
  /**
162
- * @param {string} current
163
- * @param {boolean} noMethods
165
+ * @param {string} current
166
+ * @param {boolean} noMethods
164
167
  * @returns {object}
165
168
  */
166
169
  const getAuthLinks = (current, noMethods) => {
@@ -193,7 +196,6 @@ const getAuthLinks = (current, noMethods) => {
193
196
  */
194
197
  router.get(
195
198
  "/login",
196
- setTenant,
197
199
  error_catcher(async (req, res) => {
198
200
  const login_form_name = getState().getConfig("login_form", "");
199
201
  if (login_form_name) {
@@ -219,7 +221,7 @@ router.get(
219
221
  * @function
220
222
  * @memberof module:auth/routes~routesRouter
221
223
  */
222
- router.get("/logout", setTenant, (req, res, next) => {
224
+ router.get("/logout", (req, res, next) => {
223
225
  req.logout();
224
226
  if (req.session.destroy)
225
227
  req.session.destroy((err) => {
@@ -241,7 +243,6 @@ router.get("/logout", setTenant, (req, res, next) => {
241
243
  */
242
244
  router.get(
243
245
  "/forgot",
244
- setTenant,
245
246
  error_catcher(async (req, res) => {
246
247
  if (getState().getConfig("allow_forgot", false)) {
247
248
  res.sendAuthWrap(
@@ -266,7 +267,6 @@ router.get(
266
267
  */
267
268
  router.get(
268
269
  "/reset",
269
- setTenant,
270
270
  error_catcher(async (req, res) => {
271
271
  const form = resetForm(req.query, req);
272
272
  res.sendAuthWrap(req.__(`Reset password`), form, {});
@@ -280,7 +280,6 @@ router.get(
280
280
  */
281
281
  router.get(
282
282
  "/verify",
283
- setTenant,
284
283
  error_catcher(async (req, res) => {
285
284
  const { token, email } = req.query;
286
285
  const result = await User.verifyWithToken({
@@ -304,7 +303,6 @@ router.get(
304
303
  */
305
304
  router.post(
306
305
  "/reset",
307
- setTenant,
308
306
  error_catcher(async (req, res) => {
309
307
  const result = await User.resetPasswordWithToken({
310
308
  email: req.body.email,
@@ -330,7 +328,6 @@ router.post(
330
328
  */
331
329
  router.post(
332
330
  "/forgot",
333
- setTenant,
334
331
  error_catcher(async (req, res) => {
335
332
  if (getState().getConfig("allow_forgot")) {
336
333
  const { email } = req.body;
@@ -364,7 +361,6 @@ router.post(
364
361
  */
365
362
  router.get(
366
363
  "/signup",
367
- setTenant,
368
364
  error_catcher(async (req, res) => {
369
365
  if (!getState().getConfig("allow_signup")) {
370
366
  req.flash("danger", req.__("Signups not enabled"));
@@ -408,7 +404,6 @@ router.get(
408
404
  */
409
405
  router.get(
410
406
  "/create_first_user",
411
- setTenant,
412
407
  error_catcher(async (req, res) => {
413
408
  const hasUsers = await User.nonEmpty();
414
409
  if (!hasUsers) {
@@ -438,7 +433,7 @@ router.get(
438
433
  */
439
434
  router.post(
440
435
  "/create_from_restore",
441
- setTenant,
436
+ setTenant, // TODO why is this needed?????
442
437
  error_catcher(async (req, res) => {
443
438
  const hasUsers = await User.nonEmpty();
444
439
  if (!hasUsers) {
@@ -467,7 +462,6 @@ router.post(
467
462
  */
468
463
  router.post(
469
464
  "/create_first_user",
470
- setTenant,
471
465
  error_catcher(async (req, res) => {
472
466
  const hasUsers = await User.nonEmpty();
473
467
  if (!hasUsers) {
@@ -510,9 +504,9 @@ router.post(
510
504
  );
511
505
 
512
506
  /**
513
- * @param {string} new_user_view_name
514
- * @param {object} req
515
- * @param {boolean} askEmail
507
+ * @param {string} new_user_view_name
508
+ * @param {object} req
509
+ * @param {boolean} askEmail
516
510
  * @returns {Promise<Form>}
517
511
  * @throws {InvalidConfiguration}
518
512
  */
@@ -588,9 +582,9 @@ const getNewUserForm = async (new_user_view_name, req, askEmail) => {
588
582
  };
589
583
 
590
584
  /**
591
- * @param {object} u
592
- * @param {object} req
593
- * @param {object} res
585
+ * @param {object} u
586
+ * @param {object} req
587
+ * @param {object} res
594
588
  * @returns {void}
595
589
  */
596
590
  const signup_login_with_user = (u, req, res) =>
@@ -620,7 +614,6 @@ const signup_login_with_user = (u, req, res) =>
620
614
  */
621
615
  router.get(
622
616
  "/signup_final_ext",
623
- setTenant,
624
617
  error_catcher(async (req, res) => {
625
618
  const new_user_form = getState().getConfig("new_user_form");
626
619
  if (!req.user || req.user.id || !new_user_form) {
@@ -642,7 +635,6 @@ router.get(
642
635
  */
643
636
  router.post(
644
637
  "/signup_final_ext",
645
- setTenant,
646
638
  error_catcher(async (req, res) => {
647
639
  const new_user_form = getState().getConfig("new_user_form");
648
640
  if (!req.user || req.user.id || !new_user_form) {
@@ -695,7 +687,6 @@ router.post(
695
687
  */
696
688
  router.post(
697
689
  "/signup_final",
698
- setTenant,
699
690
  error_catcher(async (req, res) => {
700
691
  if (getState().getConfig("allow_signup")) {
701
692
  const new_user_form = getState().getConfig("new_user_form");
@@ -757,7 +748,6 @@ router.post(
757
748
  */
758
749
  router.post(
759
750
  "/signup",
760
- setTenant,
761
751
  error_catcher(async (req, res) => {
762
752
  if (!getState().getConfig("allow_signup")) {
763
753
  req.flash("danger", req.__("Signups not enabled"));
@@ -868,8 +858,8 @@ router.post(
868
858
  );
869
859
 
870
860
  /**
871
- * @param {object} req
872
- * @param {object} res
861
+ * @param {object} req
862
+ * @param {object} res
873
863
  * @returns {void}
874
864
  */
875
865
  function handler(req, res) {
@@ -888,7 +878,7 @@ function handler(req, res) {
888
878
 
889
879
  /**
890
880
  * try to find a unique user id in login submit
891
- * @param {object} body
881
+ * @param {object} body
892
882
  * @returns {string}
893
883
  */
894
884
  const userIdKey = (body) => {
@@ -920,7 +910,6 @@ const userLimiter = rateLimit({
920
910
  */
921
911
  router.post(
922
912
  "/login",
923
- setTenant,
924
913
  ipLimiter,
925
914
  userLimiter,
926
915
  passport.authenticate("local", {
@@ -954,7 +943,6 @@ router.post(
954
943
  */
955
944
  router.get(
956
945
  "/login-with/:method",
957
- setTenant,
958
946
  error_catcher(async (req, res, next) => {
959
947
  const { method } = req.params;
960
948
  const auth = getState().auth_methods[method];
@@ -977,7 +965,6 @@ router.get(
977
965
  */
978
966
  router.post(
979
967
  "/login-with/:method",
980
- setTenant,
981
968
  error_catcher(async (req, res, next) => {
982
969
  const { method } = req.params;
983
970
  const auth = getState().auth_methods[method];
@@ -999,8 +986,8 @@ router.post(
999
986
  );
1000
987
 
1001
988
  /**
1002
- * @param {object}} req
1003
- * @param {object} res
989
+ * @param {object}} req
990
+ * @param {object} res
1004
991
  * @returns {void}
1005
992
  */
1006
993
  const loginCallback = (req, res) => () => {
@@ -1024,7 +1011,6 @@ const loginCallback = (req, res) => () => {
1024
1011
  */
1025
1012
  router.get(
1026
1013
  "/callback/:method",
1027
- setTenant,
1028
1014
  error_catcher(async (req, res, next) => {
1029
1015
  const { method } = req.params;
1030
1016
  const auth = getState().auth_methods[method];
@@ -1039,7 +1025,7 @@ router.get(
1039
1025
  );
1040
1026
 
1041
1027
  /**
1042
- * @param {object} req
1028
+ * @param {object} req
1043
1029
  * @returns {Form}
1044
1030
  */
1045
1031
  const changPwForm = (req) =>
@@ -1064,8 +1050,8 @@ const changPwForm = (req) =>
1064
1050
  });
1065
1051
 
1066
1052
  /**
1067
- * @param {object} req
1068
- * @param {object} user
1053
+ * @param {object} req
1054
+ * @param {object} user
1069
1055
  * @returns {Form}
1070
1056
  */
1071
1057
  const setLanguageForm = (req, user) =>
@@ -1098,21 +1084,67 @@ const setLanguageForm = (req, user) =>
1098
1084
  * @returns {Promise<object>}
1099
1085
  */
1100
1086
  const userSettings = async ({ req, res, pwform, user }) => {
1101
- let usersets;
1087
+ let usersets, userSetsName;
1102
1088
  const user_settings_form = getState().getConfig("user_settings_form", "");
1103
1089
  if (user_settings_form) {
1104
1090
  const view = await View.findOne({ name: user_settings_form });
1105
1091
  if (view) {
1106
1092
  usersets = await view.run({ id: user.id }, { req, res });
1093
+ userSetsName = view.name;
1107
1094
  }
1108
1095
  }
1109
-
1096
+ let apikeycard;
1097
+ const min_role_apikeygen = +getState().getConfig("min_role_apikeygen", 1);
1098
+ if (user.role_id <= min_role_apikeygen)
1099
+ apikeycard = {
1100
+ type: "card",
1101
+ title: req.__("API token"),
1102
+ contents: [
1103
+ // api token for user
1104
+ div(
1105
+ user.api_token
1106
+ ? span({ class: "mr-1" }, req.__("API token for this user: ")) +
1107
+ code(user.api_token)
1108
+ : req.__("No API token issued")
1109
+ ),
1110
+ // button for reset or generate api token
1111
+ div(
1112
+ { class: "mt-4 d-inline-block" },
1113
+ post_btn(
1114
+ `/auth/gen-api-token`,
1115
+ user.api_token ? req.__("Reset") : req.__("Generate"),
1116
+ req.csrfToken()
1117
+ )
1118
+ ),
1119
+ // button for remove api token
1120
+ user.api_token &&
1121
+ div(
1122
+ { class: "mt-4 ml-2 d-inline-block" },
1123
+ post_btn(
1124
+ `/auth/remove-api-token`,
1125
+ // TBD localization
1126
+ user.api_token ? req.__("Remove") : req.__("Generate"),
1127
+ req.csrfToken(),
1128
+ { req: req, confirm: true }
1129
+ )
1130
+ ),
1131
+ ],
1132
+ };
1110
1133
  return {
1111
1134
  above: [
1112
1135
  {
1113
1136
  type: "breadcrumbs",
1114
1137
  crumbs: [{ text: req.__("User") }, { text: req.__("Settings") }],
1115
1138
  },
1139
+ ...(usersets
1140
+ ? [
1141
+ {
1142
+ type: "card",
1143
+ title: userSetsName,
1144
+ contents: usersets,
1145
+ },
1146
+ ]
1147
+ : []),
1116
1148
  {
1117
1149
  type: "card",
1118
1150
  title: req.__("User"),
@@ -1126,24 +1158,52 @@ const userSettings = async ({ req, res, pwform, user }) => {
1126
1158
  )
1127
1159
  ),
1128
1160
  },
1129
- ...(usersets
1130
- ? [
1131
- {
1132
- type: "card",
1133
- title: req.__("User Settings"),
1134
- contents: usersets,
1135
- },
1136
- ]
1137
- : []),
1138
1161
  {
1139
1162
  type: "card",
1140
1163
  title: req.__("Change password"),
1141
1164
  contents: renderForm(pwform, req.csrfToken()),
1142
1165
  },
1166
+ ...(apikeycard ? [apikeycard] : []),
1143
1167
  ],
1144
1168
  };
1145
1169
  };
1170
+ /**
1171
+ * Get new api token
1172
+ * @name post/gen-api-token/:id
1173
+ * @function
1174
+ * @memberof module:auth/admin~auth/adminRouter
1175
+ */
1176
+ router.post(
1177
+ "/gen-api-token",
1178
+ error_catcher(async (req, res) => {
1179
+ const min_role_apikeygen = +getState().getConfig("min_role_apikeygen", 1);
1180
+ if (req.user.role_id <= min_role_apikeygen) {
1181
+ const u = await User.findOne({ id: req.user.id });
1182
+ await u.getNewAPIToken();
1183
+ req.flash("success", req.__(`New API token generated`));
1184
+ }
1185
+ res.redirect(`/auth/settings`);
1186
+ })
1187
+ );
1146
1188
 
1189
+ /**
1190
+ * Remove api token
1191
+ * @name post/remove-api-token/:id
1192
+ * @function
1193
+ * @memberof module:auth/admin~auth/adminRouter
1194
+ */
1195
+ router.post(
1196
+ "/remove-api-token",
1197
+ error_catcher(async (req, res) => {
1198
+ const min_role_apikeygen = +getState().getConfig("min_role_apikeygen", 1);
1199
+ if (req.user.role_id <= min_role_apikeygen) {
1200
+ const u = await User.findOne({ id: req.user.id });
1201
+ await u.removeAPIToken();
1202
+ req.flash("success", req.__(`API token removed`));
1203
+ }
1204
+ res.redirect(`/auth/settings`);
1205
+ })
1206
+ );
1147
1207
  /**
1148
1208
  * Set language
1149
1209
  * @name post/setlanguage
@@ -1152,7 +1212,6 @@ const userSettings = async ({ req, res, pwform, user }) => {
1152
1212
  */
1153
1213
  router.post(
1154
1214
  "/setlanguage",
1155
- setTenant,
1156
1215
  loggedIn,
1157
1216
  error_catcher(async (req, res) => {
1158
1217
  const u = await User.findOne({ id: req.user.id });
@@ -1191,7 +1250,6 @@ router.post(
1191
1250
  */
1192
1251
  router.get(
1193
1252
  "/settings",
1194
- setTenant,
1195
1253
  loggedIn,
1196
1254
  error_catcher(async (req, res) => {
1197
1255
  const user = await User.findOne({ id: req.user.id });
@@ -1232,7 +1290,6 @@ const setEmailForm = (req) =>
1232
1290
  */
1233
1291
  router.get(
1234
1292
  "/set-email",
1235
- setTenant,
1236
1293
  error_catcher(async (req, res) => {
1237
1294
  res.sendWrap(
1238
1295
  req.__("Set Email"),
@@ -1249,7 +1306,6 @@ router.get(
1249
1306
  */
1250
1307
  router.post(
1251
1308
  "/set-email",
1252
- setTenant,
1253
1309
  error_catcher(async (req, res) => {
1254
1310
  const form = setEmailForm(req);
1255
1311
  form.validate(req.body);
@@ -1299,7 +1355,6 @@ router.post(
1299
1355
  */
1300
1356
  router.post(
1301
1357
  "/settings",
1302
- setTenant,
1303
1358
  loggedIn,
1304
1359
  error_catcher(async (req, res) => {
1305
1360
  const user = await User.findOne({ id: req.user.id });
@@ -1350,7 +1405,6 @@ router.post(
1350
1405
  */
1351
1406
  router.all(
1352
1407
  "/verification-flow",
1353
- setTenant,
1354
1408
  loggedIn,
1355
1409
  error_catcher(async (req, res) => {
1356
1410
  const verifier = await (getState().verifier || (() => null))(req.user);
package/locales/en.json CHANGED
@@ -814,5 +814,34 @@
814
814
  "Number of columns (1-12) allocated to the list view": "Number of columns (1-12) allocated to the list view",
815
815
  "New tenant template": "New tenant template",
816
816
  "Copy site structure for new tenants from this tenant": "Copy site structure for new tenants from this tenant",
817
- "Use this link: <a href=\"%s\">%s</a> to revisit your application at any time.": "Use this link: <a href=\"%s\">%s</a> to revisit your application at any time."
817
+ "Use this link: <a href=\"%s\">%s</a> to revisit your application at any time.": "Use this link: <a href=\"%s\">%s</a> to revisit your application at any time.",
818
+ "Use Amazon S3": "Use Amazon S3",
819
+ "Use Amazon S3 (or compatible) service to store files. If disabled, Saltcorn uses local disk. WARNING: Changing this may break your uploaded files!": "Use Amazon S3 (or compatible) service to store files. If disabled, Saltcorn uses local disk. WARNING: Changing this may break your uploaded files!",
820
+ "Amazon S3 Bucket": "Amazon S3 Bucket",
821
+ "Name you selected for your S3 bucket in AWS.": "Name you selected for your S3 bucket in AWS.",
822
+ "Amazon S3 Path Prefix": "Amazon S3 Path Prefix",
823
+ "Prefix you selected for your S3 bucket in AWS.": "Prefix you selected for your S3 bucket in AWS.",
824
+ "Amazon S3 Endpoint": "Amazon S3 Endpoint",
825
+ "Hostname of your S3 Compatible Storage provider. Defaults to 's3.amazonaws.com'.": "Hostname of your S3 Compatible Storage provider. Defaults to 's3.amazonaws.com'.",
826
+ "Amazon S3 Region": "Amazon S3 Region",
827
+ "AWS region you selected when creating your S3 bucket. Default ti 'us-east-1'.": "AWS region you selected when creating your S3 bucket. Default ti 'us-east-1'.",
828
+ "Amazon S3 Access Key ID": "Amazon S3 Access Key ID",
829
+ "Only required if you do not want to authenticate to S3 using an IAM role. Enter the Access Key ID provided by your Amazon EC2 administrator.": "Only required if you do not want to authenticate to S3 using an IAM role. Enter the Access Key ID provided by your Amazon EC2 administrator.",
830
+ "Amazon S3 Secret Access Key": "Amazon S3 Secret Access Key",
831
+ "The secret access key associated with your Amazon S3 Access Key ID.": "The secret access key associated with your Amazon S3 Access Key ID.",
832
+ "Use Amazon S3 Secure Connection.": "Use Amazon S3 Secure Connection.",
833
+ "Connect to Amazon S3 (or compatible) securely.": "Connect to Amazon S3 (or compatible) securely.",
834
+ "Storage settings": "Storage settings",
835
+ "Storage": "Storage",
836
+ "Storage settings updated": "Storage settings updated",
837
+ "Label formula": "Label formula",
838
+ "Include formula": "Include formula",
839
+ "If specified, only include in menu rows that evaluate to true": "If specified, only include in menu rows that evaluate to true",
840
+ "URL formula": "URL formula",
841
+ "Order field": "Order field",
842
+ "Section field": "Section field",
843
+ "Optional. String type with options, each of which will become a menu section": "Optional. String type with options, each of which will become a menu section",
844
+ "Role to generate API keys": "Role to generate API keys",
845
+ "User should have this role or higher to generate API keys in their user settings": "User should have this role or higher to generate API keys in their user settings",
846
+ "API token removed": "API token removed"
818
847
  }
package/markup/admin.js CHANGED
@@ -213,6 +213,22 @@ const send_users_page = (args) => {
213
213
  });
214
214
  };
215
215
 
216
+ /**
217
+ * @param {object} args
218
+ * @returns {void}
219
+ */
220
+ const send_files_page = (args) => {
221
+ return send_settings_page({
222
+ main_section: "Files",
223
+ main_section_href: "/files",
224
+ sub_sections: [
225
+ { text: "Files", href: "/files" },
226
+ { text: "Storage", href: "/files/storage" },
227
+ ],
228
+ ...args,
229
+ });
230
+ };
231
+
216
232
  /**
217
233
  * @param {object} args
218
234
  * @returns {void}
@@ -464,6 +480,7 @@ module.exports = {
464
480
  send_users_page,
465
481
  send_events_page,
466
482
  send_admin_page,
483
+ send_files_page,
467
484
  save_config_from_form,
468
485
  flash_restart_if_required,
469
486
  flash_restart,
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@saltcorn/server",
3
- "version": "0.6.2-beta.1",
3
+ "version": "0.6.2-beta.5",
4
4
  "description": "Server app for Saltcorn, open-source no-code platform",
5
5
  "homepage": "https://saltcorn.com",
6
6
  "main": "index.js",
7
7
  "license": "MIT",
8
8
  "dependencies": {
9
- "@saltcorn/base-plugin": "0.6.2-beta.1",
10
- "@saltcorn/builder": "0.6.2-beta.1",
11
- "@saltcorn/data": "0.6.2-beta.1",
9
+ "@saltcorn/base-plugin": "0.6.2-beta.5",
10
+ "@saltcorn/builder": "0.6.2-beta.5",
11
+ "@saltcorn/data": "0.6.2-beta.5",
12
12
  "greenlock-express": "^4.0.3",
13
- "@saltcorn/markup": "0.6.2-beta.1",
14
- "@saltcorn/sbadmin2": "0.6.2-beta.1",
13
+ "@saltcorn/markup": "0.6.2-beta.5",
14
+ "@saltcorn/sbadmin2": "0.6.2-beta.5",
15
15
  "@socket.io/cluster-adapter": "^0.1.0",
16
16
  "@socket.io/sticky": "^1.0.1",
17
17
  "connect-flash": "^0.1.1",
@@ -40,7 +40,12 @@
40
40
  "pg": "^8.2.1",
41
41
  "pluralize": "^8.0.0",
42
42
  "socket.io": "4.2.0",
43
- "tmp-promise": "^3.0.2"
43
+ "tmp-promise": "^3.0.2",
44
+ "multer-s3": "^2.10.0",
45
+ "multer": "^1.4.3",
46
+ "aws-sdk": "^2.1037.0",
47
+ "uuid": "^8.2.0",
48
+ "content-disposition": "^0.5.3"
44
49
  },
45
50
  "optionalDependencies": {
46
51
  "sd-notify": "^2.8.0"
@@ -67,7 +72,11 @@
67
72
  "/plugin_packages/"
68
73
  ],
69
74
  "moduleNameMapper": {
70
- "@saltcorn/sqlite/(.*)": "@saltcorn/sqlite/dist/$1"
75
+ "@saltcorn/sqlite/(.*)": "@saltcorn/sqlite/dist/$1",
76
+ "@saltcorn/db-common/(.*)": "@saltcorn/db-common/dist/$1",
77
+ "@saltcorn/data/(.*)": "@saltcorn/data/dist/$1",
78
+ "@saltcorn/markup$": "@saltcorn/markup/dist",
79
+ "@saltcorn/markup/(.*)": "@saltcorn/markup/dist/$1"
71
80
  }
72
81
  },
73
82
  "publishConfig": {
@@ -0,0 +1,10 @@
1
+ /*
2
+ Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
3
+ For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ (function(a){if("undefined"==typeof a)throw Error("jQuery should be loaded before CKEditor jQuery adapter.");if("undefined"==typeof CKEDITOR)throw Error("CKEditor should be loaded before CKEditor jQuery adapter.");CKEDITOR.config.jqueryOverrideVal="undefined"==typeof CKEDITOR.config.jqueryOverrideVal?!0:CKEDITOR.config.jqueryOverrideVal;a.extend(a.fn,{ckeditorGet:function(){var a=this.eq(0).data("ckeditorInstance");if(!a)throw"CKEditor is not initialized yet, use ckeditor() with a callback.";return a},
6
+ ckeditor:function(g,e){if(!CKEDITOR.env.isCompatible)throw Error("The environment is incompatible.");if(!a.isFunction(g)){var m=e;e=g;g=m}var k=[];e=e||{};this.each(function(){var b=a(this),c=b.data("ckeditorInstance"),f=b.data("_ckeditorInstanceLock"),h=this,l=new a.Deferred;k.push(l.promise());if(c&&!f)g&&g.apply(c,[this]),l.resolve();else if(f)c.once("instanceReady",function(){setTimeout(function d(){c.element?(c.element.$==h&&g&&g.apply(c,[h]),l.resolve()):setTimeout(d,100)},0)},null,null,9999);
7
+ else{if(e.autoUpdateElement||"undefined"==typeof e.autoUpdateElement&&CKEDITOR.config.autoUpdateElement)e.autoUpdateElementJquery=!0;e.autoUpdateElement=!1;b.data("_ckeditorInstanceLock",!0);c=a(this).is("textarea")?CKEDITOR.replace(h,e):CKEDITOR.inline(h,e);b.data("ckeditorInstance",c);c.on("instanceReady",function(e){var d=e.editor;setTimeout(function n(){if(d.element){e.removeListener();d.on("dataReady",function(){b.trigger("dataReady.ckeditor",[d])});d.on("setData",function(a){b.trigger("setData.ckeditor",
8
+ [d,a.data])});d.on("getData",function(a){b.trigger("getData.ckeditor",[d,a.data])},999);d.on("destroy",function(){b.trigger("destroy.ckeditor",[d])});d.on("save",function(){a(h.form).submit();return!1},null,null,20);if(d.config.autoUpdateElementJquery&&b.is("textarea")&&a(h.form).length){var c=function(){b.ckeditor(function(){d.updateElement()})};a(h.form).submit(c);a(h.form).bind("form-pre-serialize",c);b.bind("destroy.ckeditor",function(){a(h.form).unbind("submit",c);a(h.form).unbind("form-pre-serialize",
9
+ c)})}d.on("destroy",function(){b.removeData("ckeditorInstance")});b.removeData("_ckeditorInstanceLock");b.trigger("instanceReady.ckeditor",[d]);g&&g.apply(d,[h]);l.resolve()}else setTimeout(n,100)},0)},null,null,9999)}});var f=new a.Deferred;this.promise=f.promise();a.when.apply(this,k).then(function(){f.resolve()});this.editor=this.eq(0).data("ckeditorInstance");return this}});CKEDITOR.config.jqueryOverrideVal&&(a.fn.val=CKEDITOR.tools.override(a.fn.val,function(g){return function(e){if(arguments.length){var m=
10
+ this,k=[],f=this.each(function(){var b=a(this),c=b.data("ckeditorInstance");if(b.is("textarea")&&c){var f=new a.Deferred;c.setData(e,function(){f.resolve()});k.push(f.promise());return!0}return g.call(b,e)});if(k.length){var b=new a.Deferred;a.when.apply(this,k).done(function(){b.resolveWith(m)});return b.promise()}return f}var f=a(this).eq(0),c=f.data("ckeditorInstance");return f.is("textarea")&&c?c.getData():g.call(f)}}))})(window.jQuery);