@strapi/admin 4.16.2 → 4.18.0

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 (804) hide show
  1. package/index.d.ts +1 -1
  2. package/index.js +1 -1
  3. package/package.json +55 -41
  4. package/strapi-server.js +3 -3
  5. package/dist/_chunks/AuthenticatedApp-342bf22f.js +0 -1476
  6. package/dist/_chunks/AuthenticatedApp-342bf22f.js.map +0 -1
  7. package/dist/_chunks/AuthenticatedApp-bb31f306.mjs +0 -1450
  8. package/dist/_chunks/AuthenticatedApp-bb31f306.mjs.map +0 -1
  9. package/dist/_chunks/DragLayer-bff96835.mjs +0 -44
  10. package/dist/_chunks/DragLayer-bff96835.mjs.map +0 -1
  11. package/dist/_chunks/DragLayer-f07eee6c.js +0 -43
  12. package/dist/_chunks/DragLayer-f07eee6c.js.map +0 -1
  13. package/dist/_chunks/HomePage-0c7717c0.mjs +0 -49
  14. package/dist/_chunks/HomePage-0c7717c0.mjs.map +0 -1
  15. package/dist/_chunks/HomePage-175f79c7.js +0 -49
  16. package/dist/_chunks/HomePage-175f79c7.js.map +0 -1
  17. package/dist/_chunks/HomePage-246cc590.mjs +0 -542
  18. package/dist/_chunks/HomePage-246cc590.mjs.map +0 -1
  19. package/dist/_chunks/HomePage-6ff9e578.js +0 -563
  20. package/dist/_chunks/HomePage-6ff9e578.js.map +0 -1
  21. package/dist/_chunks/InstalledPluginsPage-170aff77.mjs +0 -134
  22. package/dist/_chunks/InstalledPluginsPage-170aff77.mjs.map +0 -1
  23. package/dist/_chunks/InstalledPluginsPage-3ae5dbb6.js +0 -153
  24. package/dist/_chunks/InstalledPluginsPage-3ae5dbb6.js.map +0 -1
  25. package/dist/_chunks/InternalErrorPage-040dc993.mjs +0 -41
  26. package/dist/_chunks/InternalErrorPage-040dc993.mjs.map +0 -1
  27. package/dist/_chunks/InternalErrorPage-d0e51ac2.js +0 -41
  28. package/dist/_chunks/InternalErrorPage-d0e51ac2.js.map +0 -1
  29. package/dist/_chunks/Layout-4b3e434a.js +0 -92
  30. package/dist/_chunks/Layout-4b3e434a.js.map +0 -1
  31. package/dist/_chunks/Layout-72fa2ace.mjs +0 -90
  32. package/dist/_chunks/Layout-72fa2ace.mjs.map +0 -1
  33. package/dist/_chunks/LimitsModal-203482b8.js +0 -84
  34. package/dist/_chunks/LimitsModal-203482b8.js.map +0 -1
  35. package/dist/_chunks/LimitsModal-da04700e.mjs +0 -82
  36. package/dist/_chunks/LimitsModal-da04700e.mjs.map +0 -1
  37. package/dist/_chunks/Login-576bbc11.js +0 -64
  38. package/dist/_chunks/Login-576bbc11.js.map +0 -1
  39. package/dist/_chunks/Login-d627bb0a.mjs +0 -62
  40. package/dist/_chunks/Login-d627bb0a.mjs.map +0 -1
  41. package/dist/_chunks/MarketplacePage-1cbfa8fd.mjs +0 -1011
  42. package/dist/_chunks/MarketplacePage-1cbfa8fd.mjs.map +0 -1
  43. package/dist/_chunks/MarketplacePage-e7cd973b.js +0 -1035
  44. package/dist/_chunks/MarketplacePage-e7cd973b.js.map +0 -1
  45. package/dist/_chunks/ProfilePage-52844daa.js +0 -665
  46. package/dist/_chunks/ProfilePage-52844daa.js.map +0 -1
  47. package/dist/_chunks/ProfilePage-ef400907.mjs +0 -642
  48. package/dist/_chunks/ProfilePage-ef400907.mjs.map +0 -1
  49. package/dist/_chunks/SSOProviders-62bfad92.mjs +0 -58
  50. package/dist/_chunks/SSOProviders-62bfad92.mjs.map +0 -1
  51. package/dist/_chunks/SSOProviders-b395a4e6.js +0 -59
  52. package/dist/_chunks/SSOProviders-b395a4e6.js.map +0 -1
  53. package/dist/_chunks/SalesPage-4a0a68fb.js +0 -51
  54. package/dist/_chunks/SalesPage-4a0a68fb.js.map +0 -1
  55. package/dist/_chunks/SalesPage-56bf9463.mjs +0 -48
  56. package/dist/_chunks/SalesPage-56bf9463.mjs.map +0 -1
  57. package/dist/_chunks/SalesPage-66f9ea32.js +0 -51
  58. package/dist/_chunks/SalesPage-66f9ea32.js.map +0 -1
  59. package/dist/_chunks/SalesPage-d0cdc1a7.js +0 -48
  60. package/dist/_chunks/SalesPage-d0cdc1a7.js.map +0 -1
  61. package/dist/_chunks/SalesPage-f9597ae7.mjs +0 -51
  62. package/dist/_chunks/SalesPage-f9597ae7.mjs.map +0 -1
  63. package/dist/_chunks/SalesPage-fceedf48.mjs +0 -51
  64. package/dist/_chunks/SalesPage-fceedf48.mjs.map +0 -1
  65. package/dist/_chunks/ar-21279f4c.js +0 -936
  66. package/dist/_chunks/ar-21279f4c.js.map +0 -1
  67. package/dist/_chunks/ar-62e5e2b3.mjs +0 -936
  68. package/dist/_chunks/ar-62e5e2b3.mjs.map +0 -1
  69. package/dist/_chunks/build-1026ce7c.mjs +0 -68
  70. package/dist/_chunks/build-1026ce7c.mjs.map +0 -1
  71. package/dist/_chunks/build-d99bcc06.js +0 -68
  72. package/dist/_chunks/build-d99bcc06.js.map +0 -1
  73. package/dist/_chunks/ca-d05fb350.js +0 -724
  74. package/dist/_chunks/ca-d05fb350.js.map +0 -1
  75. package/dist/_chunks/ca-e99de225.mjs +0 -724
  76. package/dist/_chunks/ca-e99de225.mjs.map +0 -1
  77. package/dist/_chunks/colors-c24a54f0.js +0 -33
  78. package/dist/_chunks/colors-c24a54f0.js.map +0 -1
  79. package/dist/_chunks/colors-e7489dd4.mjs +0 -34
  80. package/dist/_chunks/colors-e7489dd4.mjs.map +0 -1
  81. package/dist/_chunks/constants-2a8f4e41.mjs +0 -11
  82. package/dist/_chunks/constants-2a8f4e41.mjs.map +0 -1
  83. package/dist/_chunks/constants-40ffa931.js +0 -11
  84. package/dist/_chunks/constants-40ffa931.js.map +0 -1
  85. package/dist/_chunks/constants-4aca55b6.js +0 -85
  86. package/dist/_chunks/constants-4aca55b6.js.map +0 -1
  87. package/dist/_chunks/constants-64899732.js +0 -30
  88. package/dist/_chunks/constants-64899732.js.map +0 -1
  89. package/dist/_chunks/constants-6c68e9a0.js +0 -229
  90. package/dist/_chunks/constants-6c68e9a0.js.map +0 -1
  91. package/dist/_chunks/constants-6ecddc43.mjs +0 -111
  92. package/dist/_chunks/constants-6ecddc43.mjs.map +0 -1
  93. package/dist/_chunks/constants-74b8a935.mjs +0 -52
  94. package/dist/_chunks/constants-74b8a935.mjs.map +0 -1
  95. package/dist/_chunks/constants-7596f6f3.js +0 -132
  96. package/dist/_chunks/constants-7596f6f3.js.map +0 -1
  97. package/dist/_chunks/constants-8092eeb5.mjs +0 -59
  98. package/dist/_chunks/constants-8092eeb5.mjs.map +0 -1
  99. package/dist/_chunks/constants-85da8cc4.js +0 -58
  100. package/dist/_chunks/constants-85da8cc4.js.map +0 -1
  101. package/dist/_chunks/constants-a6fd64fc.mjs +0 -80
  102. package/dist/_chunks/constants-a6fd64fc.mjs.map +0 -1
  103. package/dist/_chunks/constants-a92ce583.mjs +0 -7
  104. package/dist/_chunks/constants-a92ce583.mjs.map +0 -1
  105. package/dist/_chunks/constants-ae0b83df.mjs +0 -227
  106. package/dist/_chunks/constants-ae0b83df.mjs.map +0 -1
  107. package/dist/_chunks/constants-c1f1f698.mjs +0 -85
  108. package/dist/_chunks/constants-c1f1f698.mjs.map +0 -1
  109. package/dist/_chunks/constants-d3dd8ed6.mjs +0 -7
  110. package/dist/_chunks/constants-d3dd8ed6.mjs.map +0 -1
  111. package/dist/_chunks/constants-d5d67ca8.js +0 -6
  112. package/dist/_chunks/constants-d5d67ca8.js.map +0 -1
  113. package/dist/_chunks/constants-da2542a3.js +0 -6
  114. package/dist/_chunks/constants-da2542a3.js.map +0 -1
  115. package/dist/_chunks/constants-ddd2d586.js +0 -82
  116. package/dist/_chunks/constants-ddd2d586.js.map +0 -1
  117. package/dist/_chunks/constants-def33545.mjs +0 -30
  118. package/dist/_chunks/constants-def33545.mjs.map +0 -1
  119. package/dist/_chunks/constants-e05f06d4.js +0 -52
  120. package/dist/_chunks/constants-e05f06d4.js.map +0 -1
  121. package/dist/_chunks/cs-2fa881a2.mjs +0 -291
  122. package/dist/_chunks/cs-2fa881a2.mjs.map +0 -1
  123. package/dist/_chunks/cs-eee75b10.js +0 -291
  124. package/dist/_chunks/cs-eee75b10.js.map +0 -1
  125. package/dist/_chunks/de-28f8bc28.mjs +0 -716
  126. package/dist/_chunks/de-28f8bc28.mjs.map +0 -1
  127. package/dist/_chunks/de-976cc986.js +0 -716
  128. package/dist/_chunks/de-976cc986.js.map +0 -1
  129. package/dist/_chunks/develop-72394876.mjs +0 -61
  130. package/dist/_chunks/develop-72394876.mjs.map +0 -1
  131. package/dist/_chunks/develop-da585b1e.js +0 -61
  132. package/dist/_chunks/develop-da585b1e.js.map +0 -1
  133. package/dist/_chunks/dk-0b759a56.mjs +0 -634
  134. package/dist/_chunks/dk-0b759a56.mjs.map +0 -1
  135. package/dist/_chunks/dk-6189917e.js +0 -634
  136. package/dist/_chunks/dk-6189917e.js.map +0 -1
  137. package/dist/_chunks/edit-29bdf5d6.js +0 -50
  138. package/dist/_chunks/edit-29bdf5d6.js.map +0 -1
  139. package/dist/_chunks/edit-923cefa0.mjs +0 -32
  140. package/dist/_chunks/edit-923cefa0.mjs.map +0 -1
  141. package/dist/_chunks/en-0e9e9327.js +0 -1022
  142. package/dist/_chunks/en-0e9e9327.js.map +0 -1
  143. package/dist/_chunks/en-e728accb.mjs +0 -1022
  144. package/dist/_chunks/en-e728accb.mjs.map +0 -1
  145. package/dist/_chunks/es-18b29db2.mjs +0 -796
  146. package/dist/_chunks/es-18b29db2.mjs.map +0 -1
  147. package/dist/_chunks/es-3ee0992a.js +0 -796
  148. package/dist/_chunks/es-3ee0992a.js.map +0 -1
  149. package/dist/_chunks/eu-8fd773c2.mjs +0 -832
  150. package/dist/_chunks/eu-8fd773c2.mjs.map +0 -1
  151. package/dist/_chunks/eu-be749f31.js +0 -832
  152. package/dist/_chunks/eu-be749f31.js.map +0 -1
  153. package/dist/_chunks/formatAPIErrors-b599cf27.js +0 -20
  154. package/dist/_chunks/formatAPIErrors-b599cf27.js.map +0 -1
  155. package/dist/_chunks/formatAPIErrors-db6ed675.mjs +0 -21
  156. package/dist/_chunks/formatAPIErrors-db6ed675.mjs.map +0 -1
  157. package/dist/_chunks/fr-29c84e1f.js +0 -762
  158. package/dist/_chunks/fr-29c84e1f.js.map +0 -1
  159. package/dist/_chunks/fr-f37df086.mjs +0 -762
  160. package/dist/_chunks/fr-f37df086.mjs.map +0 -1
  161. package/dist/_chunks/gu-377a4b46.js +0 -623
  162. package/dist/_chunks/gu-377a4b46.js.map +0 -1
  163. package/dist/_chunks/gu-69f0e13a.mjs +0 -623
  164. package/dist/_chunks/gu-69f0e13a.mjs.map +0 -1
  165. package/dist/_chunks/he-aec27352.js +0 -326
  166. package/dist/_chunks/he-aec27352.js.map +0 -1
  167. package/dist/_chunks/he-bd769d7e.mjs +0 -326
  168. package/dist/_chunks/he-bd769d7e.mjs.map +0 -1
  169. package/dist/_chunks/hi-1bdc7a46.js +0 -722
  170. package/dist/_chunks/hi-1bdc7a46.js.map +0 -1
  171. package/dist/_chunks/hi-d397a24b.mjs +0 -722
  172. package/dist/_chunks/hi-d397a24b.mjs.map +0 -1
  173. package/dist/_chunks/hu-e2c05f40.js +0 -832
  174. package/dist/_chunks/hu-e2c05f40.js.map +0 -1
  175. package/dist/_chunks/hu-eb88bd0c.mjs +0 -832
  176. package/dist/_chunks/hu-eb88bd0c.mjs.map +0 -1
  177. package/dist/_chunks/id-586df3a2.js +0 -448
  178. package/dist/_chunks/id-586df3a2.js.map +0 -1
  179. package/dist/_chunks/id-f47699e6.mjs +0 -448
  180. package/dist/_chunks/id-f47699e6.mjs.map +0 -1
  181. package/dist/_chunks/index-10a05917.mjs +0 -51
  182. package/dist/_chunks/index-10a05917.mjs.map +0 -1
  183. package/dist/_chunks/index-115d317b.mjs +0 -244
  184. package/dist/_chunks/index-115d317b.mjs.map +0 -1
  185. package/dist/_chunks/index-171715e4.js +0 -697
  186. package/dist/_chunks/index-171715e4.js.map +0 -1
  187. package/dist/_chunks/index-176cc121.mjs +0 -469
  188. package/dist/_chunks/index-176cc121.mjs.map +0 -1
  189. package/dist/_chunks/index-1bac5263.js +0 -338
  190. package/dist/_chunks/index-1bac5263.js.map +0 -1
  191. package/dist/_chunks/index-200c5a6a.js +0 -51
  192. package/dist/_chunks/index-200c5a6a.js.map +0 -1
  193. package/dist/_chunks/index-215b5421.mjs +0 -51
  194. package/dist/_chunks/index-215b5421.mjs.map +0 -1
  195. package/dist/_chunks/index-23401c29.js +0 -418
  196. package/dist/_chunks/index-23401c29.js.map +0 -1
  197. package/dist/_chunks/index-242c859c.js +0 -335
  198. package/dist/_chunks/index-242c859c.js.map +0 -1
  199. package/dist/_chunks/index-26fcb3ca.mjs +0 -1432
  200. package/dist/_chunks/index-26fcb3ca.mjs.map +0 -1
  201. package/dist/_chunks/index-28dd9303.mjs +0 -51
  202. package/dist/_chunks/index-28dd9303.mjs.map +0 -1
  203. package/dist/_chunks/index-296c14bf.mjs +0 -362
  204. package/dist/_chunks/index-296c14bf.mjs.map +0 -1
  205. package/dist/_chunks/index-2de06c32.js +0 -51
  206. package/dist/_chunks/index-2de06c32.js.map +0 -1
  207. package/dist/_chunks/index-2eb69b5d.mjs +0 -399
  208. package/dist/_chunks/index-2eb69b5d.mjs.map +0 -1
  209. package/dist/_chunks/index-2f61e3ae.js +0 -585
  210. package/dist/_chunks/index-2f61e3ae.js.map +0 -1
  211. package/dist/_chunks/index-308b73ba.mjs +0 -60
  212. package/dist/_chunks/index-308b73ba.mjs.map +0 -1
  213. package/dist/_chunks/index-34e41e15.js +0 -134
  214. package/dist/_chunks/index-34e41e15.js.map +0 -1
  215. package/dist/_chunks/index-38115cde.js +0 -66
  216. package/dist/_chunks/index-38115cde.js.map +0 -1
  217. package/dist/_chunks/index-383efae4.mjs +0 -55
  218. package/dist/_chunks/index-383efae4.mjs.map +0 -1
  219. package/dist/_chunks/index-3b426575.js +0 -47
  220. package/dist/_chunks/index-3b426575.js.map +0 -1
  221. package/dist/_chunks/index-47af1603.js +0 -253
  222. package/dist/_chunks/index-47af1603.js.map +0 -1
  223. package/dist/_chunks/index-49b7e6ff.mjs +0 -1266
  224. package/dist/_chunks/index-49b7e6ff.mjs.map +0 -1
  225. package/dist/_chunks/index-4d9b2cb9.js +0 -47
  226. package/dist/_chunks/index-4d9b2cb9.js.map +0 -1
  227. package/dist/_chunks/index-4de70b5d.js +0 -3404
  228. package/dist/_chunks/index-4de70b5d.js.map +0 -1
  229. package/dist/_chunks/index-59b1f604.js +0 -380
  230. package/dist/_chunks/index-59b1f604.js.map +0 -1
  231. package/dist/_chunks/index-5a5217e0.mjs +0 -308
  232. package/dist/_chunks/index-5a5217e0.mjs.map +0 -1
  233. package/dist/_chunks/index-5da07c41.js +0 -418
  234. package/dist/_chunks/index-5da07c41.js.map +0 -1
  235. package/dist/_chunks/index-600cb5dd.js +0 -51
  236. package/dist/_chunks/index-600cb5dd.js.map +0 -1
  237. package/dist/_chunks/index-608d8d10.mjs +0 -393
  238. package/dist/_chunks/index-608d8d10.mjs.map +0 -1
  239. package/dist/_chunks/index-74812118.mjs +0 -53
  240. package/dist/_chunks/index-74812118.mjs.map +0 -1
  241. package/dist/_chunks/index-7d578921.js +0 -847
  242. package/dist/_chunks/index-7d578921.js.map +0 -1
  243. package/dist/_chunks/index-8109fa91.mjs +0 -676
  244. package/dist/_chunks/index-8109fa91.mjs.map +0 -1
  245. package/dist/_chunks/index-82c7a120.js +0 -15401
  246. package/dist/_chunks/index-82c7a120.js.map +0 -1
  247. package/dist/_chunks/index-83d53962.js +0 -62
  248. package/dist/_chunks/index-83d53962.js.map +0 -1
  249. package/dist/_chunks/index-88298941.js +0 -54
  250. package/dist/_chunks/index-88298941.js.map +0 -1
  251. package/dist/_chunks/index-8933483b.mjs +0 -3374
  252. package/dist/_chunks/index-8933483b.mjs.map +0 -1
  253. package/dist/_chunks/index-91df57b1.mjs +0 -826
  254. package/dist/_chunks/index-91df57b1.mjs.map +0 -1
  255. package/dist/_chunks/index-973c363e.mjs +0 -63
  256. package/dist/_chunks/index-973c363e.mjs.map +0 -1
  257. package/dist/_chunks/index-989bbeec.mjs +0 -232
  258. package/dist/_chunks/index-989bbeec.mjs.map +0 -1
  259. package/dist/_chunks/index-9910dda4.js +0 -55
  260. package/dist/_chunks/index-9910dda4.js.map +0 -1
  261. package/dist/_chunks/index-9afb163a.js +0 -418
  262. package/dist/_chunks/index-9afb163a.js.map +0 -1
  263. package/dist/_chunks/index-9f61bef8.js +0 -51
  264. package/dist/_chunks/index-9f61bef8.js.map +0 -1
  265. package/dist/_chunks/index-ab31623a.mjs +0 -273
  266. package/dist/_chunks/index-ab31623a.mjs.map +0 -1
  267. package/dist/_chunks/index-ac85118a.mjs +0 -47
  268. package/dist/_chunks/index-ac85118a.mjs.map +0 -1
  269. package/dist/_chunks/index-ad8e55c0.mjs +0 -866
  270. package/dist/_chunks/index-ad8e55c0.mjs.map +0 -1
  271. package/dist/_chunks/index-aedeaf5a.js +0 -311
  272. package/dist/_chunks/index-aedeaf5a.js.map +0 -1
  273. package/dist/_chunks/index-bbac142a.js +0 -125
  274. package/dist/_chunks/index-bbac142a.js.map +0 -1
  275. package/dist/_chunks/index-bd18f803.mjs +0 -15320
  276. package/dist/_chunks/index-bd18f803.mjs.map +0 -1
  277. package/dist/_chunks/index-c8b8a2ee.mjs +0 -359
  278. package/dist/_chunks/index-c8b8a2ee.mjs.map +0 -1
  279. package/dist/_chunks/index-c97f5820.js +0 -1456
  280. package/dist/_chunks/index-c97f5820.js.map +0 -1
  281. package/dist/_chunks/index-cb6a72d2.mjs +0 -127
  282. package/dist/_chunks/index-cb6a72d2.mjs.map +0 -1
  283. package/dist/_chunks/index-cbc7c054.js +0 -266
  284. package/dist/_chunks/index-cbc7c054.js.map +0 -1
  285. package/dist/_chunks/index-ce5995cd.mjs +0 -132
  286. package/dist/_chunks/index-ce5995cd.mjs.map +0 -1
  287. package/dist/_chunks/index-d1152896.js +0 -294
  288. package/dist/_chunks/index-d1152896.js.map +0 -1
  289. package/dist/_chunks/index-d1dd825b.js +0 -365
  290. package/dist/_chunks/index-d1dd825b.js.map +0 -1
  291. package/dist/_chunks/index-d2d9df41.mjs +0 -270
  292. package/dist/_chunks/index-d2d9df41.mjs.map +0 -1
  293. package/dist/_chunks/index-d3e1fd86.js +0 -490
  294. package/dist/_chunks/index-d3e1fd86.js.map +0 -1
  295. package/dist/_chunks/index-d4517ac4.mjs +0 -582
  296. package/dist/_chunks/index-d4517ac4.mjs.map +0 -1
  297. package/dist/_chunks/index-d49fa655.js +0 -873
  298. package/dist/_chunks/index-d49fa655.js.map +0 -1
  299. package/dist/_chunks/index-d6694cab.mjs +0 -125
  300. package/dist/_chunks/index-d6694cab.mjs.map +0 -1
  301. package/dist/_chunks/index-e117c643.mjs +0 -55
  302. package/dist/_chunks/index-e117c643.mjs.map +0 -1
  303. package/dist/_chunks/index-e1b90981.mjs +0 -314
  304. package/dist/_chunks/index-e1b90981.mjs.map +0 -1
  305. package/dist/_chunks/index-e24df0bf.js +0 -403
  306. package/dist/_chunks/index-e24df0bf.js.map +0 -1
  307. package/dist/_chunks/index-e2d2f58e.mjs +0 -47
  308. package/dist/_chunks/index-e2d2f58e.mjs.map +0 -1
  309. package/dist/_chunks/index-e369d741.mjs +0 -383
  310. package/dist/_chunks/index-e369d741.mjs.map +0 -1
  311. package/dist/_chunks/index-e79b2b9e.mjs +0 -338
  312. package/dist/_chunks/index-e79b2b9e.mjs.map +0 -1
  313. package/dist/_chunks/index-ea18ff22.mjs +0 -51
  314. package/dist/_chunks/index-ea18ff22.mjs.map +0 -1
  315. package/dist/_chunks/index-eb67694f.mjs +0 -261
  316. package/dist/_chunks/index-eb67694f.mjs.map +0 -1
  317. package/dist/_chunks/index-ed3696ec.js +0 -272
  318. package/dist/_chunks/index-ed3696ec.js.map +0 -1
  319. package/dist/_chunks/index-ee1ea38b.js +0 -129
  320. package/dist/_chunks/index-ee1ea38b.js.map +0 -1
  321. package/dist/_chunks/index-efc967f5.js +0 -55
  322. package/dist/_chunks/index-efc967f5.js.map +0 -1
  323. package/dist/_chunks/index-fc700e52.js +0 -263
  324. package/dist/_chunks/index-fc700e52.js.map +0 -1
  325. package/dist/_chunks/index-fd4e5616.mjs +0 -412
  326. package/dist/_chunks/index-fd4e5616.mjs.map +0 -1
  327. package/dist/_chunks/index-ffd2f664.js +0 -1337
  328. package/dist/_chunks/index-ffd2f664.js.map +0 -1
  329. package/dist/_chunks/it-4006227c.mjs +0 -459
  330. package/dist/_chunks/it-4006227c.mjs.map +0 -1
  331. package/dist/_chunks/it-9c4295f1.js +0 -459
  332. package/dist/_chunks/it-9c4295f1.js.map +0 -1
  333. package/dist/_chunks/ja-db43ca3d.mjs +0 -633
  334. package/dist/_chunks/ja-db43ca3d.mjs.map +0 -1
  335. package/dist/_chunks/ja-eb74520f.js +0 -633
  336. package/dist/_chunks/ja-eb74520f.js.map +0 -1
  337. package/dist/_chunks/ko-18e71df4.js +0 -631
  338. package/dist/_chunks/ko-18e71df4.js.map +0 -1
  339. package/dist/_chunks/ko-a7826e25.mjs +0 -631
  340. package/dist/_chunks/ko-a7826e25.mjs.map +0 -1
  341. package/dist/_chunks/ml-90131768.mjs +0 -722
  342. package/dist/_chunks/ml-90131768.mjs.map +0 -1
  343. package/dist/_chunks/ml-c5199364.js +0 -722
  344. package/dist/_chunks/ml-c5199364.js.map +0 -1
  345. package/dist/_chunks/ms-bc514df6.js +0 -342
  346. package/dist/_chunks/ms-bc514df6.js.map +0 -1
  347. package/dist/_chunks/ms-f4f16a83.mjs +0 -342
  348. package/dist/_chunks/ms-f4f16a83.mjs.map +0 -1
  349. package/dist/_chunks/nl-887ce2c3.mjs +0 -828
  350. package/dist/_chunks/nl-887ce2c3.mjs.map +0 -1
  351. package/dist/_chunks/nl-f1aedbe2.js +0 -828
  352. package/dist/_chunks/nl-f1aedbe2.js.map +0 -1
  353. package/dist/_chunks/no-ec6c2927.js +0 -310
  354. package/dist/_chunks/no-ec6c2927.js.map +0 -1
  355. package/dist/_chunks/no-f0b02541.mjs +0 -310
  356. package/dist/_chunks/no-f0b02541.mjs.map +0 -1
  357. package/dist/_chunks/pl-9be86414.js +0 -721
  358. package/dist/_chunks/pl-9be86414.js.map +0 -1
  359. package/dist/_chunks/pl-9ccd35d9.mjs +0 -721
  360. package/dist/_chunks/pl-9ccd35d9.mjs.map +0 -1
  361. package/dist/_chunks/pt-4fcc08f1.js +0 -296
  362. package/dist/_chunks/pt-4fcc08f1.js.map +0 -1
  363. package/dist/_chunks/pt-8acb6ac1.mjs +0 -296
  364. package/dist/_chunks/pt-8acb6ac1.mjs.map +0 -1
  365. package/dist/_chunks/pt-BR-d43239e3.js +0 -794
  366. package/dist/_chunks/pt-BR-d43239e3.js.map +0 -1
  367. package/dist/_chunks/pt-BR-fd73cb13.mjs +0 -794
  368. package/dist/_chunks/pt-BR-fd73cb13.mjs.map +0 -1
  369. package/dist/_chunks/ru-9aad40c5.mjs +0 -993
  370. package/dist/_chunks/ru-9aad40c5.mjs.map +0 -1
  371. package/dist/_chunks/ru-c0293425.js +0 -993
  372. package/dist/_chunks/ru-c0293425.js.map +0 -1
  373. package/dist/_chunks/sa-6bf4c20e.mjs +0 -722
  374. package/dist/_chunks/sa-6bf4c20e.mjs.map +0 -1
  375. package/dist/_chunks/sa-8ffb7ca7.js +0 -722
  376. package/dist/_chunks/sa-8ffb7ca7.js.map +0 -1
  377. package/dist/_chunks/schema-260fec28.js +0 -514
  378. package/dist/_chunks/schema-260fec28.js.map +0 -1
  379. package/dist/_chunks/schema-6bd8bd85.mjs +0 -490
  380. package/dist/_chunks/schema-6bd8bd85.mjs.map +0 -1
  381. package/dist/_chunks/sk-58d31b17.mjs +0 -690
  382. package/dist/_chunks/sk-58d31b17.mjs.map +0 -1
  383. package/dist/_chunks/sk-a9308737.js +0 -690
  384. package/dist/_chunks/sk-a9308737.js.map +0 -1
  385. package/dist/_chunks/sv-0f5ffd1e.js +0 -827
  386. package/dist/_chunks/sv-0f5ffd1e.js.map +0 -1
  387. package/dist/_chunks/sv-d80ad633.mjs +0 -827
  388. package/dist/_chunks/sv-d80ad633.mjs.map +0 -1
  389. package/dist/_chunks/th-a53bbf7a.js +0 -430
  390. package/dist/_chunks/th-a53bbf7a.js.map +0 -1
  391. package/dist/_chunks/th-e72c6a22.mjs +0 -430
  392. package/dist/_chunks/th-e72c6a22.mjs.map +0 -1
  393. package/dist/_chunks/tr-b84a68b0.js +0 -785
  394. package/dist/_chunks/tr-b84a68b0.js.map +0 -1
  395. package/dist/_chunks/tr-e35ecfe8.mjs +0 -785
  396. package/dist/_chunks/tr-e35ecfe8.mjs.map +0 -1
  397. package/dist/_chunks/uk-de367ec1.mjs +0 -343
  398. package/dist/_chunks/uk-de367ec1.mjs.map +0 -1
  399. package/dist/_chunks/uk-e5226227.js +0 -343
  400. package/dist/_chunks/uk-e5226227.js.map +0 -1
  401. package/dist/_chunks/useAdminRolePermissions-603a2709.mjs +0 -2322
  402. package/dist/_chunks/useAdminRolePermissions-603a2709.mjs.map +0 -1
  403. package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js +0 -2337
  404. package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js.map +0 -1
  405. package/dist/_chunks/useAdminRoles-68d5d608.js +0 -62
  406. package/dist/_chunks/useAdminRoles-68d5d608.js.map +0 -1
  407. package/dist/_chunks/useAdminRoles-7ab5d521.mjs +0 -44
  408. package/dist/_chunks/useAdminRoles-7ab5d521.mjs.map +0 -1
  409. package/dist/_chunks/useAdminUsers-05d6b26a.js +0 -61
  410. package/dist/_chunks/useAdminUsers-05d6b26a.js.map +0 -1
  411. package/dist/_chunks/useAdminUsers-09f86a58.mjs +0 -43
  412. package/dist/_chunks/useAdminUsers-09f86a58.mjs.map +0 -1
  413. package/dist/_chunks/useContentTypes-53b449bb.mjs +0 -67
  414. package/dist/_chunks/useContentTypes-53b449bb.mjs.map +0 -1
  415. package/dist/_chunks/useContentTypes-7da293cc.js +0 -85
  416. package/dist/_chunks/useContentTypes-7da293cc.js.map +0 -1
  417. package/dist/_chunks/useDebounce-4712871e.js +0 -35
  418. package/dist/_chunks/useDebounce-4712871e.js.map +0 -1
  419. package/dist/_chunks/useDebounce-9364f340.mjs +0 -17
  420. package/dist/_chunks/useDebounce-9364f340.mjs.map +0 -1
  421. package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs +0 -80
  422. package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs.map +0 -1
  423. package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js +0 -100
  424. package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js.map +0 -1
  425. package/dist/_chunks/useLicenseLimits-13a102d3.mjs +0 -31
  426. package/dist/_chunks/useLicenseLimits-13a102d3.mjs.map +0 -1
  427. package/dist/_chunks/useLicenseLimits-81ef3cce.js +0 -49
  428. package/dist/_chunks/useLicenseLimits-81ef3cce.js.map +0 -1
  429. package/dist/_chunks/useReviewWorkflows-799e0305.js +0 -59
  430. package/dist/_chunks/useReviewWorkflows-799e0305.js.map +0 -1
  431. package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs +0 -41
  432. package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs.map +0 -1
  433. package/dist/_chunks/validateWorkflow-5693ea2d.js +0 -1124
  434. package/dist/_chunks/validateWorkflow-5693ea2d.js.map +0 -1
  435. package/dist/_chunks/validateWorkflow-7a2b6ab8.mjs +0 -1101
  436. package/dist/_chunks/validateWorkflow-7a2b6ab8.mjs.map +0 -1
  437. package/dist/_chunks/vi-096bccbb.mjs +0 -298
  438. package/dist/_chunks/vi-096bccbb.mjs.map +0 -1
  439. package/dist/_chunks/vi-c5fabb75.js +0 -298
  440. package/dist/_chunks/vi-c5fabb75.js.map +0 -1
  441. package/dist/_chunks/zh-24f618cb.js +0 -836
  442. package/dist/_chunks/zh-24f618cb.js.map +0 -1
  443. package/dist/_chunks/zh-Hans-35d2c374.js +0 -957
  444. package/dist/_chunks/zh-Hans-35d2c374.js.map +0 -1
  445. package/dist/_chunks/zh-Hans-ccf4be4b.mjs +0 -957
  446. package/dist/_chunks/zh-Hans-ccf4be4b.mjs.map +0 -1
  447. package/dist/_chunks/zh-ba29b2e1.mjs +0 -836
  448. package/dist/_chunks/zh-ba29b2e1.mjs.map +0 -1
  449. package/dist/admin/index.js +0 -34
  450. package/dist/admin/index.js.map +0 -1
  451. package/dist/admin/index.mjs +0 -34
  452. package/dist/admin/index.mjs.map +0 -1
  453. package/dist/admin/src/App.d.ts +0 -6
  454. package/dist/admin/src/StrapiApp.d.ts +0 -140
  455. package/dist/admin/src/components/AuthenticatedApp.d.ts +0 -2
  456. package/dist/admin/src/components/ConfigurationProvider.d.ts +0 -11
  457. package/dist/admin/src/components/DefaultDocument.d.ts +0 -5
  458. package/dist/admin/src/components/DragLayer.d.ts +0 -10
  459. package/dist/admin/src/components/GuidedTour/Homepage.d.ts +0 -2
  460. package/dist/admin/src/components/GuidedTour/Modal.d.ts +0 -2
  461. package/dist/admin/src/components/GuidedTour/Ornaments.d.ts +0 -13
  462. package/dist/admin/src/components/GuidedTour/Provider.d.ts +0 -6
  463. package/dist/admin/src/components/GuidedTour/constants.d.ts +0 -165
  464. package/dist/admin/src/components/LanguageProvider.d.ts +0 -19
  465. package/dist/admin/src/components/LeftMenu.d.ts +0 -5
  466. package/dist/admin/src/components/NoJavascript.d.ts +0 -7
  467. package/dist/admin/src/components/NpsSurvey.d.ts +0 -17
  468. package/dist/admin/src/components/Onboarding.d.ts +0 -2
  469. package/dist/admin/src/components/PluginsInitializer.d.ts +0 -5
  470. package/dist/admin/src/components/PrivateRoute.d.ts +0 -8
  471. package/dist/admin/src/components/Providers.d.ts +0 -13
  472. package/dist/admin/src/components/RBACProvider.d.ts +0 -27
  473. package/dist/admin/src/components/Theme.d.ts +0 -6
  474. package/dist/admin/src/components/ThemeToggleProvider.d.ts +0 -12
  475. package/dist/admin/src/components/UnauthenticatedLogo.d.ts +0 -2
  476. package/dist/admin/src/constants.d.ts +0 -195
  477. package/dist/admin/src/content-manager/components/BlocksInput/BlocksContent.d.ts +0 -5
  478. package/dist/admin/src/content-manager/components/BlocksInput/BlocksEditor.d.ts +0 -34
  479. package/dist/admin/src/content-manager/components/BlocksInput/BlocksInput.d.ts +0 -18
  480. package/dist/admin/src/content-manager/components/BlocksInput/BlocksToolbar.d.ts +0 -2
  481. package/dist/admin/src/content-manager/components/BlocksInput/hooks/useBlocksStore.d.ts +0 -32
  482. package/dist/admin/src/content-manager/components/BlocksInput/hooks/useModifiersStore.d.ts +0 -20
  483. package/dist/admin/src/content-manager/components/BlocksInput/plugins/withLinks.d.ts +0 -8
  484. package/dist/admin/src/content-manager/components/BlocksInput/plugins/withStrapiSchema.d.ts +0 -8
  485. package/dist/admin/src/content-manager/components/BlocksInput/tests/mock-schema.d.ts +0 -2
  486. package/dist/admin/src/content-manager/components/BlocksInput/utils/links.d.ts +0 -10
  487. package/dist/admin/src/content-manager/components/BlocksInput/utils/types.d.ts +0 -6
  488. package/dist/admin/src/contexts/admin.d.ts +0 -14
  489. package/dist/admin/src/contexts/apiTokenPermissions.d.ts +0 -36
  490. package/dist/admin/src/contexts/configuration.d.ts +0 -27
  491. package/dist/admin/src/contexts/themeToggle.d.ts +0 -22
  492. package/dist/admin/src/core/apis/Components.d.ts +0 -10
  493. package/dist/admin/src/core/apis/CustomFields.d.ts +0 -8
  494. package/dist/admin/src/core/apis/Fields.d.ts +0 -10
  495. package/dist/admin/src/core/apis/Middlewares.d.ts +0 -9
  496. package/dist/admin/src/core/apis/Plugin.d.ts +0 -19
  497. package/dist/admin/src/core/apis/Reducers.d.ts +0 -10
  498. package/dist/admin/src/core/store/configure.d.ts +0 -29
  499. package/dist/admin/src/core/store/hooks.d.ts +0 -37
  500. package/dist/admin/src/core/utils/basename.d.ts +0 -1
  501. package/dist/admin/src/core/utils/createHook.d.ts +0 -10
  502. package/dist/admin/src/hooks/__mocks__/useAdminUsers.d.ts +0 -2
  503. package/dist/admin/src/hooks/__mocks__/useContentTypes.d.ts +0 -2
  504. package/dist/admin/src/hooks/__mocks__/useSettingsMenu.d.ts +0 -2
  505. package/dist/admin/src/hooks/useAdminRoles.d.ts +0 -13
  506. package/dist/admin/src/hooks/useAdminUsers.d.ts +0 -19
  507. package/dist/admin/src/hooks/useContentTypes.d.ts +0 -7
  508. package/dist/admin/src/hooks/useDebounce.d.ts +0 -1
  509. package/dist/admin/src/hooks/useEnterprise.d.ts +0 -8
  510. package/dist/admin/src/hooks/useInjectReducer.d.ts +0 -10
  511. package/dist/admin/src/hooks/useLicenseLimitNotification.d.ts +0 -1
  512. package/dist/admin/src/hooks/useMenu.d.ts +0 -9
  513. package/dist/admin/src/hooks/useSettingsMenu.d.ts +0 -24
  514. package/dist/admin/src/index.d.ts +0 -3
  515. package/dist/admin/src/layouts/AppLayout.d.ts +0 -7
  516. package/dist/admin/src/layouts/UnauthenticatedLayout.d.ts +0 -11
  517. package/dist/admin/src/pages/Admin.d.ts +0 -7
  518. package/dist/admin/src/pages/Auth/AuthPage.d.ts +0 -6
  519. package/dist/admin/src/pages/Auth/components/FieldActionWrapper.d.ts +0 -3
  520. package/dist/admin/src/pages/Auth/components/ForgotPassword.d.ts +0 -3
  521. package/dist/admin/src/pages/Auth/components/ForgotPasswordSuccess.d.ts +0 -2
  522. package/dist/admin/src/pages/Auth/components/Login.d.ts +0 -8
  523. package/dist/admin/src/pages/Auth/components/Oops.d.ts +0 -2
  524. package/dist/admin/src/pages/Auth/components/Register.d.ts +0 -7
  525. package/dist/admin/src/pages/Auth/components/ResetPassword.d.ts +0 -3
  526. package/dist/admin/src/pages/Auth/constants.d.ts +0 -14
  527. package/dist/admin/src/pages/HomePage.d.ts +0 -3
  528. package/dist/admin/src/pages/InstalledPluginsPage.d.ts +0 -3
  529. package/dist/admin/src/pages/InternalErrorPage.d.ts +0 -7
  530. package/dist/admin/src/pages/Marketplace/MarketplacePage.d.ts +0 -19
  531. package/dist/admin/src/pages/Marketplace/components/NpmPackageCard.d.ts +0 -13
  532. package/dist/admin/src/pages/Marketplace/components/NpmPackagesFilters.d.ts +0 -13
  533. package/dist/admin/src/pages/Marketplace/components/NpmPackagesGrid.d.ts +0 -13
  534. package/dist/admin/src/pages/Marketplace/components/OfflineLayout.d.ts +0 -2
  535. package/dist/admin/src/pages/Marketplace/components/PageHeader.d.ts +0 -8
  536. package/dist/admin/src/pages/Marketplace/components/SortSelect.d.ts +0 -51
  537. package/dist/admin/src/pages/Marketplace/hooks/__mocks__/useNavigatorOnline.d.ts +0 -1
  538. package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +0 -92
  539. package/dist/admin/src/pages/Marketplace/hooks/useNavigatorOnline.d.ts +0 -5
  540. package/dist/admin/src/pages/NotFoundPage.d.ts +0 -1
  541. package/dist/admin/src/pages/ProfilePage.d.ts +0 -2
  542. package/dist/admin/src/pages/SettingsPage/hooks/useRegenerate.d.ts +0 -4
  543. package/dist/admin/src/pages/SettingsPage/pages/Roles/EditPage/hooks/usePermissionsDataManager.d.ts +0 -24
  544. package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/__mocks__/useAdminRolePermissions.d.ts +0 -2
  545. package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissions.d.ts +0 -11
  546. package/dist/admin/src/pages/SettingsPage/utils/makeUniqueRoutes.d.ts +0 -6
  547. package/dist/admin/src/pages/UseCasePage.d.ts +0 -8
  548. package/dist/admin/src/reducer.d.ts +0 -21
  549. package/dist/admin/src/render.d.ts +0 -10
  550. package/dist/admin/src/selectors.d.ts +0 -21
  551. package/dist/admin/src/shared/components/InjectionZone.d.ts +0 -53
  552. package/dist/admin/src/shared/hooks/__mocks__/useInjectionZone.d.ts +0 -1
  553. package/dist/admin/src/shared/hooks/useInjectionZone.d.ts +0 -2
  554. package/dist/admin/src/translations/languageNativeNames.d.ts +0 -36
  555. package/dist/admin/src/types/permissions.d.ts +0 -17
  556. package/dist/admin/src/utils/createRoute.d.ts +0 -6
  557. package/dist/admin/src/utils/formatAPIErrors.d.ts +0 -6
  558. package/dist/admin/src/utils/getFullName.d.ts +0 -1
  559. package/dist/admin/src/utils/hashAdminUserEmail.d.ts +0 -6
  560. package/dist/cli.js +0 -48
  561. package/dist/cli.js.map +0 -1
  562. package/dist/cli.mjs +0 -48
  563. package/dist/cli.mjs.map +0 -1
  564. package/dist/ee/admin/src/constants.d.ts +0 -55
  565. package/dist/ee/admin/src/hooks/useLicenseLimitNotification.d.ts +0 -1
  566. package/dist/ee/admin/src/pages/AuthPage/components/Login.d.ts +0 -3
  567. package/dist/ee/admin/src/pages/AuthPage/components/Providers.d.ts +0 -2
  568. package/dist/ee/admin/src/pages/AuthPage/components/SSOProviders.d.ts +0 -8
  569. package/dist/ee/admin/src/pages/AuthPage/constants.d.ts +0 -3
  570. package/dist/ee/admin/src/pages/AuthResponse.d.ts +0 -2
  571. package/dist/ee/admin/src/pages/HomePage.d.ts +0 -1
  572. package/dist/shared/contracts/admin.d.ts +0 -23
  573. package/dist/shared/contracts/authentication.d.ts +0 -126
  574. package/dist/shared/contracts/providers.d.ts +0 -34
  575. package/dist/shared/contracts/roles.d.ts +0 -52
  576. package/dist/shared/contracts/shared.d.ts +0 -39
  577. package/dist/shared/contracts/user.d.ts +0 -40
  578. package/dist/shared/contracts/users.d.ts +0 -52
  579. package/dist/shared/schema.d.ts +0 -7
  580. package/ee/server/bootstrap.js +0 -41
  581. package/ee/server/config/admin-actions.js +0 -72
  582. package/ee/server/constants/default-stages.json +0 -18
  583. package/ee/server/constants/default-workflow.json +0 -3
  584. package/ee/server/constants/webhookEvents.js +0 -5
  585. package/ee/server/constants/workflows.js +0 -33
  586. package/ee/server/content-types/index.js +0 -9
  587. package/ee/server/content-types/workflow/index.js +0 -41
  588. package/ee/server/content-types/workflow-stage/index.js +0 -51
  589. package/ee/server/controllers/__tests__/stages.test.js +0 -174
  590. package/ee/server/controllers/admin.js +0 -50
  591. package/ee/server/controllers/audit-logs.js +0 -24
  592. package/ee/server/controllers/authentication/constants.js +0 -11
  593. package/ee/server/controllers/authentication/index.js +0 -11
  594. package/ee/server/controllers/authentication/middlewares.js +0 -117
  595. package/ee/server/controllers/authentication/utils.js +0 -23
  596. package/ee/server/controllers/authentication.js +0 -64
  597. package/ee/server/controllers/index.js +0 -12
  598. package/ee/server/controllers/role.js +0 -64
  599. package/ee/server/controllers/user.js +0 -110
  600. package/ee/server/controllers/workflows/assignees/index.js +0 -44
  601. package/ee/server/controllers/workflows/index.js +0 -188
  602. package/ee/server/controllers/workflows/stages/index.js +0 -189
  603. package/ee/server/destroy.js +0 -12
  604. package/ee/server/index.js +0 -11
  605. package/ee/server/middlewares/__tests__/review-workflows.test.js +0 -40
  606. package/ee/server/middlewares/review-workflows.js +0 -40
  607. package/ee/server/migrations/audit-logs-table.js +0 -45
  608. package/ee/server/migrations/review-workflows-content-types.js +0 -29
  609. package/ee/server/migrations/review-workflows-deleted-ct-in-workflows.js +0 -39
  610. package/ee/server/migrations/review-workflows-stage-attribute.js +0 -49
  611. package/ee/server/migrations/review-workflows-stages-color.js +0 -20
  612. package/ee/server/migrations/review-workflows-stages-roles.js +0 -68
  613. package/ee/server/migrations/review-workflows-workflow-name.js +0 -28
  614. package/ee/server/register.js +0 -40
  615. package/ee/server/routes/audit-logs.js +0 -43
  616. package/ee/server/routes/index.js +0 -8
  617. package/ee/server/routes/license-limit.js +0 -29
  618. package/ee/server/routes/review-workflows.js +0 -164
  619. package/ee/server/routes/sso.js +0 -69
  620. package/ee/server/routes/utils.js +0 -15
  621. package/ee/server/services/__tests__/assignees.test.js +0 -76
  622. package/ee/server/services/__tests__/audit-logs.test.js +0 -300
  623. package/ee/server/services/__tests__/passport.test.js +0 -95
  624. package/ee/server/services/__tests__/review-workflows-validation.test.js +0 -100
  625. package/ee/server/services/__tests__/review-workflows.test.js +0 -163
  626. package/ee/server/services/__tests__/sso.test.js +0 -117
  627. package/ee/server/services/__tests__/stages.test.js +0 -275
  628. package/ee/server/services/__tests__/workflows.test.js +0 -203
  629. package/ee/server/services/audit-logs.js +0 -236
  630. package/ee/server/services/auth.js +0 -75
  631. package/ee/server/services/index.js +0 -18
  632. package/ee/server/services/passport/provider-registry.js +0 -27
  633. package/ee/server/services/passport/sso.js +0 -37
  634. package/ee/server/services/passport.js +0 -46
  635. package/ee/server/services/review-workflows/__tests__/entity-service-decorator.test.js +0 -211
  636. package/ee/server/services/review-workflows/assignees.js +0 -54
  637. package/ee/server/services/review-workflows/entity-service-decorator.js +0 -101
  638. package/ee/server/services/review-workflows/metrics/__tests__/weekly-metrics.test.js +0 -65
  639. package/ee/server/services/review-workflows/metrics/index.js +0 -56
  640. package/ee/server/services/review-workflows/metrics/weekly-metrics.js +0 -76
  641. package/ee/server/services/review-workflows/review-workflows.js +0 -133
  642. package/ee/server/services/review-workflows/stage-permissions.js +0 -60
  643. package/ee/server/services/review-workflows/stages.js +0 -384
  644. package/ee/server/services/review-workflows/validation.js +0 -68
  645. package/ee/server/services/review-workflows/workflows/__tests__/content-types.test.js +0 -146
  646. package/ee/server/services/review-workflows/workflows/content-types.js +0 -89
  647. package/ee/server/services/review-workflows/workflows/index.js +0 -237
  648. package/ee/server/services/role.js +0 -24
  649. package/ee/server/services/seat-enforcement.js +0 -114
  650. package/ee/server/services/user.js +0 -234
  651. package/ee/server/utils/__tests__/persisted-tables.test.js +0 -38
  652. package/ee/server/utils/__tests__/sso-lock.test.js +0 -84
  653. package/ee/server/utils/index.js +0 -8
  654. package/ee/server/utils/persisted-tables.js +0 -139
  655. package/ee/server/utils/review-workflows.js +0 -39
  656. package/ee/server/utils/sso-lock.js +0 -42
  657. package/ee/server/validation/audit-logs.js +0 -18
  658. package/ee/server/validation/authentication.js +0 -36
  659. package/ee/server/validation/review-workflows.js +0 -92
  660. package/ee/server/validation/role.js +0 -68
  661. package/ee/server/validation/user.js +0 -27
  662. package/ee/strapi-server.js +0 -3
  663. package/server/bootstrap.js +0 -101
  664. package/server/config/admin-actions.js +0 -216
  665. package/server/config/admin-conditions.js +0 -26
  666. package/server/config/email-templates/forgot-password.js +0 -25
  667. package/server/config/index.js +0 -9
  668. package/server/config/settings.js +0 -9
  669. package/server/content-types/Permission.js +0 -64
  670. package/server/content-types/Role.js +0 -59
  671. package/server/content-types/User.js +0 -112
  672. package/server/content-types/api-token-permission.js +0 -36
  673. package/server/content-types/api-token.js +0 -76
  674. package/server/content-types/index.js +0 -11
  675. package/server/content-types/transfer-token-permission.js +0 -36
  676. package/server/content-types/transfer-token.js +0 -66
  677. package/server/controllers/__tests__/admin.test.js +0 -106
  678. package/server/controllers/__tests__/api-token.test.js +0 -496
  679. package/server/controllers/__tests__/content-api.test.js +0 -173
  680. package/server/controllers/__tests__/permission.test.js +0 -200
  681. package/server/controllers/__tests__/role.test.js +0 -201
  682. package/server/controllers/__tests__/transfer/token.test.js +0 -520
  683. package/server/controllers/__tests__/user.test.js +0 -326
  684. package/server/controllers/admin.js +0 -151
  685. package/server/controllers/api-token.js +0 -135
  686. package/server/controllers/authenticated-user.js +0 -52
  687. package/server/controllers/authentication.js +0 -172
  688. package/server/controllers/content-api.js +0 -15
  689. package/server/controllers/formatters/conditions.js +0 -12
  690. package/server/controllers/formatters/format-actions-by-sections.js +0 -40
  691. package/server/controllers/formatters/index.js +0 -9
  692. package/server/controllers/index.js +0 -14
  693. package/server/controllers/permission.js +0 -45
  694. package/server/controllers/role.js +0 -198
  695. package/server/controllers/transfer/index.js +0 -13
  696. package/server/controllers/transfer/runner.js +0 -28
  697. package/server/controllers/transfer/token.js +0 -131
  698. package/server/controllers/user.js +0 -141
  699. package/server/controllers/webhooks.js +0 -132
  700. package/server/destroy.js +0 -10
  701. package/server/domain/action/__tests__/action-domain.test.js +0 -230
  702. package/server/domain/action/__tests__/action-provider.test.js +0 -376
  703. package/server/domain/action/index.js +0 -142
  704. package/server/domain/action/provider.js +0 -83
  705. package/server/domain/condition/__tests__/condition-domain.test.js +0 -122
  706. package/server/domain/condition/__tests__/condition-provider.test.js +0 -156
  707. package/server/domain/condition/index.js +0 -92
  708. package/server/domain/condition/provider.js +0 -42
  709. package/server/domain/permission/__tests__/permission-domain.test.js +0 -285
  710. package/server/domain/permission/index.js +0 -156
  711. package/server/domain/user.js +0 -28
  712. package/server/index.js +0 -26
  713. package/server/middlewares/data-transfer.js +0 -29
  714. package/server/middlewares/index.js +0 -8
  715. package/server/middlewares/rateLimit.js +0 -47
  716. package/server/policies/hasPermissions.js +0 -38
  717. package/server/policies/index.js +0 -7
  718. package/server/policies/isAuthenticatedAdmin.js +0 -5
  719. package/server/policies/isTelemetryEnabled.js +0 -16
  720. package/server/register.js +0 -19
  721. package/server/routes/admin.js +0 -71
  722. package/server/routes/api-tokens.js +0 -70
  723. package/server/routes/authentication.js +0 -57
  724. package/server/routes/content-api.js +0 -20
  725. package/server/routes/index.js +0 -28
  726. package/server/routes/permissions.js +0 -20
  727. package/server/routes/roles.js +0 -107
  728. package/server/routes/serve-admin-panel.js +0 -71
  729. package/server/routes/transfer.js +0 -102
  730. package/server/routes/users.js +0 -88
  731. package/server/routes/webhooks.js +0 -81
  732. package/server/services/__tests__/action.test.js +0 -98
  733. package/server/services/__tests__/api-token.test.js +0 -980
  734. package/server/services/__tests__/auth.test.js +0 -319
  735. package/server/services/__tests__/content-type.test.js +0 -405
  736. package/server/services/__tests__/metrics.test.js +0 -65
  737. package/server/services/__tests__/passport.test.js +0 -90
  738. package/server/services/__tests__/permission.test.js +0 -177
  739. package/server/services/__tests__/permissions-manager-sanitize.test.js +0 -117
  740. package/server/services/__tests__/permissions-manager-validate.test.js +0 -119
  741. package/server/services/__tests__/permissions-manager.test.js +0 -318
  742. package/server/services/__tests__/permissions.section-builder.section.test.js +0 -136
  743. package/server/services/__tests__/project-settings.test.js +0 -397
  744. package/server/services/__tests__/role.test.js +0 -970
  745. package/server/services/__tests__/token.test.js +0 -217
  746. package/server/services/__tests__/transfer/token.test.js +0 -878
  747. package/server/services/__tests__/user.test.js +0 -786
  748. package/server/services/action.js +0 -35
  749. package/server/services/api-token.js +0 -453
  750. package/server/services/auth.js +0 -117
  751. package/server/services/condition.js +0 -14
  752. package/server/services/constants.js +0 -37
  753. package/server/services/content-type.js +0 -208
  754. package/server/services/index.js +0 -18
  755. package/server/services/metrics.js +0 -44
  756. package/server/services/passport/local-strategy.js +0 -28
  757. package/server/services/passport.js +0 -45
  758. package/server/services/permission/engine.js +0 -85
  759. package/server/services/permission/permissions-manager/index.js +0 -53
  760. package/server/services/permission/permissions-manager/query-builders.js +0 -72
  761. package/server/services/permission/permissions-manager/sanitize.js +0 -286
  762. package/server/services/permission/permissions-manager/validate.js +0 -218
  763. package/server/services/permission/queries.js +0 -190
  764. package/server/services/permission/sections-builder/builder.js +0 -84
  765. package/server/services/permission/sections-builder/handlers.js +0 -156
  766. package/server/services/permission/sections-builder/index.js +0 -50
  767. package/server/services/permission/sections-builder/section.js +0 -71
  768. package/server/services/permission/sections-builder/utils.js +0 -26
  769. package/server/services/permission.js +0 -33
  770. package/server/services/project-settings.js +0 -174
  771. package/server/services/role.js +0 -471
  772. package/server/services/token.js +0 -70
  773. package/server/services/transfer/index.js +0 -7
  774. package/server/services/transfer/permission.js +0 -22
  775. package/server/services/transfer/token.js +0 -449
  776. package/server/services/transfer/utils.js +0 -38
  777. package/server/services/user.js +0 -363
  778. package/server/strategies/__tests__/admin.test.js +0 -118
  779. package/server/strategies/__tests__/api-token.test.js +0 -364
  780. package/server/strategies/admin.js +0 -52
  781. package/server/strategies/api-token.js +0 -140
  782. package/server/strategies/data-transfer.js +0 -113
  783. package/server/strategies/index.js +0 -26
  784. package/server/utils/index.d.ts +0 -25
  785. package/server/utils/index.js +0 -9
  786. package/server/validation/__tests__/common-functions.test.js +0 -54
  787. package/server/validation/action-provider.js +0 -67
  788. package/server/validation/api-tokens.js +0 -32
  789. package/server/validation/authentication/forgot-password.js +0 -14
  790. package/server/validation/authentication/index.js +0 -19
  791. package/server/validation/authentication/register.js +0 -45
  792. package/server/validation/authentication/renew-token.js +0 -7
  793. package/server/validation/authentication/reset-password.js +0 -15
  794. package/server/validation/common-functions/check-fields-are-correctly-nested.js +0 -28
  795. package/server/validation/common-functions/check-fields-dont-have-duplicates.js +0 -17
  796. package/server/validation/common-functions/index.js +0 -9
  797. package/server/validation/common-validators.js +0 -209
  798. package/server/validation/permission.js +0 -53
  799. package/server/validation/policies/hasPermissions.js +0 -27
  800. package/server/validation/project-settings.js +0 -48
  801. package/server/validation/role.js +0 -59
  802. package/server/validation/transfer/index.js +0 -5
  803. package/server/validation/transfer/token.js +0 -42
  804. package/server/validation/user.js +0 -65
@@ -1,122 +0,0 @@
1
- 'use strict';
2
-
3
- const domain = require('..');
4
-
5
- describe('Condition Domain', () => {
6
- describe('assignConditionId', () => {
7
- test('Create a new condition with an id attribute. Prevent mutation on original object', () => {
8
- const condition = { name: 'foobar' };
9
-
10
- const newCondition = domain.assignConditionId(condition);
11
-
12
- // Original condition shouldn't be mutated
13
- expect(condition).not.toHaveProperty('id');
14
- // The new condition should match the original one and add a new conditionId attribute
15
- expect(newCondition).toMatchObject(condition);
16
- expect(newCondition).toHaveProperty('id', 'api::foobar');
17
- });
18
- });
19
-
20
- describe('computeConditionId', () => {
21
- test('Should return a condition ID prefixed with "api::" when there is no plugin', () => {
22
- const attributes = { name: 'foobar' };
23
- const expected = 'api::foobar';
24
-
25
- const id = domain.computeConditionId(attributes);
26
-
27
- expect(id).toBe(expected);
28
- });
29
-
30
- test('Should return a condition id prefixed with "admin::" when the plugin is "admin"', () => {
31
- const attributes = { name: 'foobar', plugin: 'admin' };
32
- const expected = 'admin::foobar';
33
-
34
- const id = domain.computeConditionId(attributes);
35
-
36
- expect(id).toBe(expected);
37
- });
38
-
39
- test('Should return a condition id prefixed with "plugin::" when there is a plugin (other than admin)', () => {
40
- const attributes = { name: 'foobar', plugin: 'myPlugin' };
41
- const expected = 'plugin::myPlugin.foobar';
42
-
43
- const id = domain.computeConditionId(attributes);
44
-
45
- expect(id).toBe(expected);
46
- });
47
- });
48
-
49
- describe('create', () => {
50
- test('Should register a condition with the minimum amount of information', () => {
51
- const handler = jest.fn(() => ({ foo: 'bar' }));
52
- const condition = {
53
- handler,
54
- name: 'foo',
55
- displayName: 'Foo',
56
- };
57
- const expected = {
58
- handler,
59
- id: 'api::foo',
60
- displayName: 'Foo',
61
- category: 'default',
62
- };
63
-
64
- const result = domain.create(condition);
65
-
66
- expect(result).toMatchObject(expected);
67
- });
68
-
69
- test('Should handle multiple step of transformation', () => {
70
- const handler = jest.fn(() => ({ foo: 'bar' }));
71
- const condition = {
72
- name: 'foo',
73
- plugin: 'bar',
74
- displayName: 'Foo',
75
- handler,
76
- invalidAttribute: 'foobar',
77
- };
78
-
79
- const expected = {
80
- id: 'plugin::bar.foo',
81
- category: 'default',
82
- plugin: 'bar',
83
- displayName: 'Foo',
84
- handler,
85
- };
86
-
87
- const result = domain.create(condition);
88
-
89
- expect(result).toMatchObject(expected);
90
- });
91
- });
92
-
93
- describe('sanitizeConditionAttributes', () => {
94
- const getSortedAttributes = (object) => Object.keys(object).sort();
95
-
96
- test(`It shouldn't remove attributes contained in domain.conditionAttributes`, () => {
97
- const condition = domain.conditionFields.reduce(
98
- (attrs, attrName) => ({ ...attrs, [attrName]: 'foo' }),
99
- {}
100
- );
101
-
102
- const sanitizedCondition = domain.sanitizeConditionAttributes(condition);
103
-
104
- expect(sanitizedCondition).toMatchObject(condition);
105
- expect(getSortedAttributes(sanitizedCondition)).toEqual(getSortedAttributes(condition));
106
- });
107
-
108
- test('It should remove attributes not contained in domain.conditionFields', () => {
109
- const invalidAttributes = ['foo', 'bar'];
110
- const condition = domain.conditionFields
111
- .concat(invalidAttributes)
112
- .reduce((attrs, attrName) => ({ ...attrs, [attrName]: 'foo' }), {});
113
-
114
- const sanitizedCondition = domain.sanitizeConditionAttributes(condition);
115
-
116
- expect(getSortedAttributes(sanitizedCondition)).not.toEqual(getSortedAttributes(condition));
117
- invalidAttributes.forEach((attribute) =>
118
- expect(sanitizedCondition).not.toHaveProperty(attribute)
119
- );
120
- });
121
- });
122
- });
@@ -1,156 +0,0 @@
1
- 'use strict';
2
-
3
- const { omit } = require('lodash/fp');
4
- const createConditionProvider = require('../provider');
5
- const domain = require('..');
6
-
7
- const providerMethods = [
8
- 'register',
9
- 'registerMany',
10
- 'delete',
11
- 'get',
12
- 'getWhere',
13
- 'values',
14
- 'keys',
15
- 'has',
16
- 'size',
17
- 'clear',
18
- ];
19
-
20
- describe('Condition Provider', () => {
21
- beforeEach(() => {
22
- global.strapi = {
23
- isLoaded: false,
24
- };
25
- });
26
-
27
- test('ConditionProvider is a provider instance', () => {
28
- const conditionProvider = createConditionProvider();
29
-
30
- expect(conditionProvider).toHaveProperty('hooks', expect.any(Object));
31
-
32
- providerMethods.forEach((methodName) =>
33
- expect(conditionProvider).toHaveProperty(methodName, expect.any(Function))
34
- );
35
- });
36
-
37
- describe('Methods', () => {
38
- describe('Register', () => {
39
- test('Can register a new condition using condition attributes', async () => {
40
- const attributes = {
41
- name: 'foobar',
42
- displayName: 'Foo bar',
43
- plugin: 'foo',
44
- handler: { foo: 'bar' },
45
- };
46
- const expected = omit('name', attributes);
47
- const id = domain.computeConditionId(attributes);
48
-
49
- const conditionProvider = createConditionProvider();
50
-
51
- await conditionProvider.register(attributes);
52
-
53
- const condition = conditionProvider.get(id);
54
-
55
- expect(condition).not.toHaveProperty('name');
56
- expect(condition).toHaveProperty('id', id);
57
- expect(condition).toMatchObject(expected);
58
- });
59
-
60
- test(`Can't register a condition if strapi is loaded`, async () => {
61
- global.strapi.isLoaded = true;
62
-
63
- const attributes = {
64
- name: 'foobar',
65
- displayName: 'Foo bar',
66
- plugin: 'foo',
67
- handler: { foo: 'bar' },
68
- };
69
-
70
- const conditionProvider = createConditionProvider();
71
-
72
- const register = () => conditionProvider.register(attributes);
73
-
74
- await expect(register()).rejects.toThrowError(
75
- `You can't register new conditions outside of the bootstrap function.`
76
- );
77
- });
78
-
79
- test('Registration hooks are triggered on register', async () => {
80
- const attributes = {
81
- name: 'foobar',
82
- displayName: 'Foo bar',
83
- plugin: 'foo',
84
- handler: { foo: 'bar' },
85
- };
86
-
87
- const willRegister = jest.fn();
88
- const didRegister = jest.fn();
89
-
90
- const conditionProvider = createConditionProvider();
91
-
92
- conditionProvider.hooks.willRegister.register(willRegister);
93
- conditionProvider.hooks.didRegister.register(didRegister);
94
-
95
- await conditionProvider.register(attributes);
96
-
97
- expect(willRegister).toHaveBeenCalled();
98
- expect(didRegister).toHaveBeenCalled();
99
- });
100
- });
101
-
102
- describe('Register Many', () => {
103
- test('Can register multiple condition at once', async () => {
104
- const attributes = [
105
- {
106
- name: 'foobar-A',
107
- displayName: 'Foo bar A',
108
- plugin: 'foo',
109
- handler: { foo: 'bar' },
110
- },
111
- {
112
- name: 'foobar-B',
113
- displayName: 'Foo bar B',
114
- plugin: 'foo',
115
- handler: { foo: 'bar' },
116
- },
117
- ];
118
-
119
- const conditionProvider = createConditionProvider();
120
-
121
- await conditionProvider.registerMany(attributes);
122
-
123
- expect(conditionProvider.size()).toBe(attributes.length);
124
- });
125
-
126
- test('Registering many condition shall trigger the registration hooks multiple time', async () => {
127
- const attributes = [
128
- {
129
- name: 'foobar-A',
130
- displayName: 'Foo bar A',
131
- plugin: 'foo',
132
- handler: { foo: 'bar' },
133
- },
134
- {
135
- name: 'foobar-B',
136
- displayName: 'Foo bar B',
137
- plugin: 'foo',
138
- handler: { foo: 'bar' },
139
- },
140
- ];
141
- const willRegister = jest.fn();
142
- const didRegister = jest.fn();
143
-
144
- const conditionProvider = createConditionProvider();
145
-
146
- conditionProvider.hooks.willRegister.register(willRegister);
147
- conditionProvider.hooks.didRegister.register(didRegister);
148
-
149
- await conditionProvider.registerMany(attributes);
150
-
151
- expect(willRegister).toHaveBeenCalledTimes(2);
152
- expect(didRegister).toHaveBeenCalledTimes(2);
153
- });
154
- });
155
- });
156
- });
@@ -1,92 +0,0 @@
1
- 'use strict';
2
-
3
- const { pipe, merge, set, pick } = require('lodash/fp');
4
-
5
- /**
6
- * The handler of a {@link Condition}
7
- * @typedef {(function(user: Object, options: Object): Object | boolean)} ConditionHandler
8
- */
9
- /**
10
- * Domain representation of a Condition (RBAC)
11
- * @typedef {Object} Condition
12
- * @property {string} id - The identifier of the condition
13
- * @property {string} displayName - The display name of a condition
14
- * @property {string} name - The name of a condition
15
- * @property {string} [plugin] - The plugin which provide the condition
16
- * @property {string} [category] - The main category of a condition
17
- * @property {ConditionHandler} handler - The handler of a condition
18
- */
19
-
20
- /**
21
- * Set of attributes used to create a new {@link Action} object
22
- * @typedef {Condition, { uid: string }} CreateConditionPayload
23
- */
24
-
25
- const DEFAULT_CATEGORY = 'default';
26
-
27
- /**
28
- * Get the default value used for every condition
29
- * @return {Condition}
30
- */
31
- const getDefaultConditionAttributes = () => ({
32
- category: DEFAULT_CATEGORY,
33
- });
34
-
35
- /**
36
- * Get the list of all the valid attributes of a {@link Condition}
37
- * @return {string[]}
38
- */
39
- const conditionFields = ['id', 'displayName', 'handler', 'plugin', 'category'];
40
-
41
- /**
42
- * Remove unwanted attributes from a {@link Condition}
43
- * @type {function(action: Condition | CreateConditionPayload): Condition}
44
- */
45
- const sanitizeConditionAttributes = pick(conditionFields);
46
-
47
- /**
48
- *
49
- * @param condition
50
- * @return {string}
51
- */
52
- const computeConditionId = (condition) => {
53
- const { name, plugin } = condition;
54
-
55
- if (!plugin) {
56
- return `api::${name}`;
57
- }
58
-
59
- if (plugin === 'admin') {
60
- return `admin::${name}`;
61
- }
62
-
63
- return `plugin::${plugin}.${name}`;
64
- };
65
-
66
- /**
67
- * Assign an id attribute to a {@link CreateConditionPayload} object
68
- * @param {CreateConditionPayload} attrs - Payload used to create a condition
69
- * @return {CreateConditionPayload}
70
- */
71
- const assignConditionId = (attrs) => set('id', computeConditionId(attrs), attrs);
72
-
73
- /**
74
- * Transform the given attributes into a domain representation of a Condition
75
- * @type (function(CreateConditionPayload): Condition)
76
- * @param {CreateConditionPayload} payload - The condition payload containing the attributes needed to create a {@link Condition}
77
- * @return {Condition}
78
- */
79
- const create = pipe(
80
- assignConditionId,
81
- sanitizeConditionAttributes,
82
- merge(getDefaultConditionAttributes())
83
- );
84
-
85
- module.exports = {
86
- assignConditionId,
87
- computeConditionId,
88
- conditionFields,
89
- create,
90
- getDefaultConditionAttributes,
91
- sanitizeConditionAttributes,
92
- };
@@ -1,42 +0,0 @@
1
- 'use strict';
2
-
3
- const { providerFactory } = require('@strapi/utils');
4
- const domain = require('.');
5
-
6
- /**
7
- * @typedef ConditionProviderOverride
8
- * @property {function(CreateConditionPayload)} register
9
- * @property {function(attributes CreateConditionPayload[]): Promise<this>} registerMany
10
- */
11
-
12
- /**
13
- * Creates a new instance of a condition provider
14
- * @return {Provider & ConditionProviderOverride}
15
- */
16
- const createConditionProvider = () => {
17
- const provider = providerFactory();
18
-
19
- return {
20
- ...provider,
21
-
22
- async register(conditionAttributes) {
23
- if (strapi.isLoaded) {
24
- throw new Error(`You can't register new conditions outside of the bootstrap function.`);
25
- }
26
-
27
- const condition = domain.create(conditionAttributes);
28
-
29
- return provider.register(condition.id, condition);
30
- },
31
-
32
- async registerMany(conditionsAttributes) {
33
- for (const attributes of conditionsAttributes) {
34
- await this.register(attributes);
35
- }
36
-
37
- return this;
38
- },
39
- };
40
- };
41
-
42
- module.exports = createConditionProvider;
@@ -1,285 +0,0 @@
1
- 'use strict';
2
-
3
- const domain = require('..');
4
-
5
- describe('Permission Domain', () => {
6
- describe('addCondition', () => {
7
- test(`Init the condition array if it doesn't exists`, async () => {
8
- const permission = {};
9
-
10
- const newPermission = domain.addCondition('foo', permission);
11
-
12
- expect(permission).not.toHaveProperty('conditions');
13
- expect(newPermission).toHaveProperty('conditions', ['foo']);
14
- });
15
-
16
- test('Adds the new condition to the permission.conditions property', async () => {
17
- const permission = { conditions: ['foo'] };
18
-
19
- const newPermission = domain.addCondition('bar', permission);
20
-
21
- expect(permission).toHaveProperty('conditions', ['foo']);
22
- expect(newPermission).toHaveProperty('conditions', ['foo', 'bar']);
23
- });
24
-
25
- test(`Don't add the new condition to the permission.conditions property if it's already been added`, async () => {
26
- const permission = { conditions: ['foo'] };
27
-
28
- const newPermission = domain.addCondition('foo', permission);
29
-
30
- expect(permission).toHaveProperty('conditions', ['foo']);
31
- expect(newPermission).toHaveProperty('conditions', ['foo']);
32
- });
33
- });
34
-
35
- describe('removeCondition', () => {
36
- test('Can remove added condition from permission.conditions', () => {
37
- const permission = { conditions: ['foo', 'bar'] };
38
-
39
- const newPermission = domain.removeCondition('foo', permission);
40
-
41
- expect(permission).toHaveProperty('conditions', ['foo', 'bar']);
42
- expect(newPermission).toHaveProperty('conditions', ['bar']);
43
- });
44
-
45
- test(`Do not remove anything if the condition isn't present in permission.conditions`, () => {
46
- const permission = { conditions: ['foo', 'bar'] };
47
-
48
- const newPermission = domain.removeCondition('foobar', permission);
49
-
50
- expect(permission).toHaveProperty('conditions', ['foo', 'bar']);
51
- expect(newPermission).toHaveProperty('conditions', ['foo', 'bar']);
52
- });
53
- });
54
-
55
- describe('create', () => {
56
- test('Removes unwanted fields', () => {
57
- const permission = {
58
- id: 1,
59
- action: 'foo',
60
- subject: 'bar',
61
- properties: {},
62
- conditions: [],
63
- foo: 'bar',
64
- };
65
-
66
- const newPermission = domain.create(permission);
67
-
68
- expect(newPermission).not.toHaveProperty('foo');
69
- });
70
- });
71
-
72
- describe('sanitizePermissionFields', () => {
73
- test('Returns a new permission without the invalid fields', () => {
74
- const invalidPermission = { action: 'foo', subject: 'bar', properties: {}, foo: 'bar' };
75
-
76
- const permission = domain.sanitizePermissionFields(invalidPermission);
77
-
78
- expect(permission).not.toHaveProperty('foo');
79
- });
80
- });
81
-
82
- describe('setProperty', () => {
83
- test('Can set a new property and its value', () => {
84
- const permission = { properties: {} };
85
-
86
- const newPermission = domain.setProperty('foo', 'bar', permission);
87
-
88
- expect(permission).toHaveProperty('properties', {});
89
- expect(newPermission).toHaveProperty('properties', { foo: 'bar' });
90
- });
91
-
92
- test('Can update the value of an existing property', () => {
93
- const permission = { properties: { foo: 'bar' } };
94
-
95
- const newPermission = domain.setProperty('foo', 'foobar', permission);
96
-
97
- expect(permission).toHaveProperty('properties', { foo: 'bar' });
98
- expect(newPermission).toHaveProperty('properties', { foo: 'foobar' });
99
- });
100
-
101
- test('Can perform a deep update on a property', () => {
102
- const permission = { properties: { foo: { bar: { foobar: null } } }, bar: 'foo' };
103
-
104
- const newPermission = domain.setProperty('foo.bar.foobar', 1, permission);
105
-
106
- expect(permission).toHaveProperty('properties.foo.bar.foobar', null);
107
- expect(newPermission).toHaveProperty('properties.foo.bar.foobar', 1);
108
- });
109
- });
110
-
111
- describe('deleteProperty', () => {
112
- test('Can delete an existing property', () => {
113
- const permission = { properties: { foo: 'bar', bar: 'foo' } };
114
-
115
- const newPermission = domain.deleteProperty('foo', permission);
116
-
117
- expect(permission).toHaveProperty('properties', { foo: 'bar', bar: 'foo' });
118
- expect(newPermission).toHaveProperty('properties', { bar: 'foo' });
119
- });
120
-
121
- test('Delete a non-existing property does nothing', () => {
122
- const permission = { properties: { foo: 'bar' } };
123
-
124
- const newPermission = domain.deleteProperty('bar', permission);
125
-
126
- expect(permission).toHaveProperty('properties', { foo: 'bar' });
127
- expect(newPermission).toHaveProperty('properties', { foo: 'bar' });
128
- });
129
-
130
- test('Can perform a deep delete on a property', () => {
131
- const permission = { properties: { foo: { bar: { foobar: null, barfoo: 2 } } }, bar: 'foo' };
132
-
133
- const newPermission = domain.deleteProperty('foo.bar.barfoo', permission);
134
-
135
- expect(permission).toHaveProperty('properties.foo.bar', { foobar: null, barfoo: 2 });
136
- expect(newPermission).toHaveProperty('properties.foo.bar', { foobar: null });
137
- });
138
- });
139
-
140
- describe('toPermission', () => {
141
- test('Handle single permission object and call domain.create', () => {
142
- const permission = {
143
- id: 1,
144
- action: 'foo',
145
- actionParameters: {},
146
- subject: 'bar',
147
- properties: {},
148
- conditions: [],
149
- foo: 'bar',
150
- };
151
-
152
- const newPermission = domain.toPermission(permission);
153
-
154
- expect(newPermission).not.toHaveProperty('foo');
155
- });
156
-
157
- test('Handle multiple permission object and call domain.create', () => {
158
- const permissions = [
159
- {
160
- id: 1,
161
- action: 'foo',
162
- actionParameters: {},
163
- subject: 'bar',
164
- properties: {},
165
- conditions: [],
166
- foo: 'bar',
167
- },
168
- {
169
- id: 2,
170
- action: 'foo',
171
- subject: 'bar',
172
- properties: {},
173
- conditions: [],
174
- foo: 'bar',
175
- },
176
- ];
177
-
178
- const newPermissions = domain.toPermission(permissions);
179
-
180
- newPermissions.forEach((p) => expect(p).not.toHaveProperty('foo'));
181
- });
182
- });
183
-
184
- describe('getProperty', () => {
185
- test('Can get a property if it exists', () => {
186
- const permission = { properties: { foo: 'bar' } };
187
-
188
- const property = domain.getProperty('foo', permission);
189
-
190
- expect(property).toBe('bar');
191
- });
192
-
193
- test('Can get a deep property if it exists', () => {
194
- const permission = { properties: { foo: { bar: 'foobar' } } };
195
-
196
- const property = domain.getProperty('foo.bar', permission);
197
-
198
- expect(property).toBe('foobar');
199
- });
200
-
201
- test(`Trying to get a property that doesn't exist returns undefined`, () => {
202
- const permission = { properties: { foo: 'bar' } };
203
-
204
- const property = domain.getProperty('bar', permission);
205
-
206
- expect(property).toBeUndefined();
207
- });
208
-
209
- test('getProperty should allow currying', () => {
210
- const permissions = [{ properties: { foo: 'bar' } }, { properties: { foo: 'foobar' } }];
211
-
212
- const getFooProperty = domain.getProperty('foo');
213
-
214
- permissions.forEach((permission) => {
215
- const fooProperty = getFooProperty(permission);
216
-
217
- expect(fooProperty).toBe(permission.properties.foo);
218
- });
219
- });
220
-
221
- test(`Trying to access property if permission.properties isn't defined should return undefined`, () => {
222
- const permission = {};
223
-
224
- const property = domain.getProperty('foo', permission);
225
-
226
- expect(property).toBeUndefined();
227
- });
228
- });
229
-
230
- describe('sanitizeConditions', () => {
231
- const conditions = ['foo', 'bar'];
232
- const conditionProvider = { has: (condition) => conditions.includes(condition) };
233
-
234
- test(`No conditions should be removed if they're valid`, () => {
235
- const permission = { conditions: ['foo', 'bar'] };
236
-
237
- const permissionWithSanitizedConditions = domain.sanitizeConditions(
238
- conditionProvider,
239
- permission
240
- );
241
-
242
- expect(permissionWithSanitizedConditions).toHaveProperty('conditions', ['foo', 'bar']);
243
- });
244
-
245
- test('Non existing permissions should be removed from the conditions property', () => {
246
- const permission = { conditions: ['foo', 'foobar'] };
247
-
248
- const permissionWithSanitizedConditions = domain.sanitizeConditions(
249
- conditionProvider,
250
- permission
251
- );
252
-
253
- expect(permissionWithSanitizedConditions).toHaveProperty('conditions', ['foo']);
254
- });
255
-
256
- test('Do nothing when permission.conditions is not defined', () => {
257
- const permission = {};
258
-
259
- const permissionWithSanitizedConditions = domain.sanitizeConditions(
260
- conditionProvider,
261
- permission
262
- );
263
-
264
- expect(permissionWithSanitizedConditions).not.toHaveProperty('conditions');
265
- });
266
-
267
- test.each([
268
- [{ conditions: [] }, []],
269
- [{ conditions: ['foo'] }, ['foo']],
270
- [{ conditions: ['foo', 'foobar'] }, ['foo']],
271
- [{ conditions: ['foobar'] }, []],
272
- [{}, undefined],
273
- ])('Should allow currying (arity 2)', (permission, expected) => {
274
- const sanitizeConditionsWithProvider = domain.sanitizeConditions(conditionProvider);
275
-
276
- const permissionWithSanitizedConditions = sanitizeConditionsWithProvider(permission);
277
-
278
- if (expected === undefined) {
279
- expect(permissionWithSanitizedConditions).not.toHaveProperty('conditions');
280
- } else {
281
- expect(permissionWithSanitizedConditions).toHaveProperty('conditions', expected);
282
- }
283
- });
284
- });
285
- });