@strapi/plugin-users-permissions 0.0.0-next.e9b6852d1c05518ff6e37d599321f7aa7aa0683b → 0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c

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 (244) hide show
  1. package/admin/src/components/BoundRoute/index.jsx +2 -2
  2. package/admin/src/components/FormModal/Input/index.jsx +32 -31
  3. package/admin/src/components/FormModal/index.jsx +57 -68
  4. package/admin/src/components/Permissions/PermissionRow/CheckboxWrapper.jsx +4 -3
  5. package/admin/src/components/Permissions/PermissionRow/SubCategory.jsx +13 -22
  6. package/admin/src/components/Permissions/index.jsx +27 -35
  7. package/admin/src/components/Permissions/reducer.js +1 -1
  8. package/admin/src/components/Policies/index.jsx +7 -5
  9. package/admin/src/components/UsersPermissions/index.jsx +15 -7
  10. package/admin/src/components/UsersPermissions/reducer.js +1 -1
  11. package/admin/src/index.js +15 -32
  12. package/admin/src/pages/AdvancedSettings/index.jsx +83 -128
  13. package/admin/src/pages/AdvancedSettings/utils/layout.js +20 -35
  14. package/admin/src/pages/AdvancedSettings/utils/schema.js +5 -2
  15. package/admin/src/pages/EmailTemplates/components/EmailForm.jsx +119 -139
  16. package/admin/src/pages/EmailTemplates/components/EmailTable.jsx +20 -17
  17. package/admin/src/pages/EmailTemplates/index.jsx +36 -62
  18. package/admin/src/pages/EmailTemplates/utils/schema.js +18 -6
  19. package/admin/src/pages/Providers/index.jsx +97 -112
  20. package/admin/src/pages/Providers/utils/forms.js +23 -11
  21. package/admin/src/pages/Roles/constants.js +3 -3
  22. package/admin/src/pages/Roles/hooks/usePlugins.js +4 -4
  23. package/admin/src/pages/Roles/index.jsx +9 -18
  24. package/admin/src/pages/Roles/pages/CreatePage.jsx +53 -58
  25. package/admin/src/pages/Roles/pages/EditPage.jsx +63 -68
  26. package/admin/src/pages/Roles/pages/ListPage/components/TableBody.jsx +27 -31
  27. package/admin/src/pages/Roles/pages/ListPage/index.jsx +79 -55
  28. package/admin/src/translations/en.json +1 -1
  29. package/admin/src/utils/prefixPluginTranslations.js +13 -0
  30. package/dist/_chunks/{ar-t5qTFaAD.js → ar-BguGUqwK.js} +1 -1
  31. package/dist/_chunks/ar-BguGUqwK.js.map +1 -0
  32. package/dist/_chunks/{ar-MvD8Ghac.mjs → ar-CK8BRRXB.mjs} +1 -1
  33. package/dist/_chunks/ar-CK8BRRXB.mjs.map +1 -0
  34. package/dist/_chunks/{cs-BMuXwxA1.mjs → cs-BVigMk0l.mjs} +1 -1
  35. package/dist/_chunks/cs-BVigMk0l.mjs.map +1 -0
  36. package/dist/_chunks/{cs-I8N4u-Sd.js → cs-BW8-K_GY.js} +1 -1
  37. package/dist/_chunks/cs-BW8-K_GY.js.map +1 -0
  38. package/dist/_chunks/{de-zs2qqc0W.mjs → de-BKUdRFI4.mjs} +1 -1
  39. package/dist/_chunks/de-BKUdRFI4.mjs.map +1 -0
  40. package/dist/_chunks/{de-YTjtq89K.js → de-owXpVluI.js} +1 -1
  41. package/dist/_chunks/de-owXpVluI.js.map +1 -0
  42. package/dist/_chunks/{dk-HctVBMsG.mjs → dk-BQiTK50l.mjs} +1 -1
  43. package/dist/_chunks/dk-BQiTK50l.mjs.map +1 -0
  44. package/dist/_chunks/{dk-TF-dWjzl.js → dk-LXAnbuBk.js} +1 -1
  45. package/dist/_chunks/dk-LXAnbuBk.js.map +1 -0
  46. package/dist/_chunks/{en-CE3wEy_c.mjs → en-DOHtPf-2.mjs} +2 -2
  47. package/dist/_chunks/en-DOHtPf-2.mjs.map +1 -0
  48. package/dist/_chunks/{en-m608rMZx.js → en-MHo5mcsU.js} +2 -2
  49. package/dist/_chunks/en-MHo5mcsU.js.map +1 -0
  50. package/dist/_chunks/{es-XBQsB8_9.js → es-BwLCLXAQ.js} +1 -1
  51. package/dist/_chunks/es-BwLCLXAQ.js.map +1 -0
  52. package/dist/_chunks/{es-9381tih_.mjs → es-DNgOVMjD.mjs} +1 -1
  53. package/dist/_chunks/es-DNgOVMjD.mjs.map +1 -0
  54. package/dist/_chunks/{fr-CMSc77If.mjs → fr-DkgRugiU.mjs} +1 -1
  55. package/dist/_chunks/fr-DkgRugiU.mjs.map +1 -0
  56. package/dist/_chunks/{fr-6cz3U-IF.js → fr-DkhpSjjm.js} +1 -1
  57. package/dist/_chunks/fr-DkhpSjjm.js.map +1 -0
  58. package/dist/_chunks/{id-RJ934rq-.js → id-BTemOeTZ.js} +1 -1
  59. package/dist/_chunks/id-BTemOeTZ.js.map +1 -0
  60. package/dist/_chunks/{id-SDuyIkZa.mjs → id-BdEsvnaF.mjs} +1 -1
  61. package/dist/_chunks/id-BdEsvnaF.mjs.map +1 -0
  62. package/dist/_chunks/{index-f7pS9YU1.js → index--y8LTL2j.js} +47 -51
  63. package/dist/_chunks/index--y8LTL2j.js.map +1 -0
  64. package/dist/_chunks/index-B7cPaHEP.mjs +344 -0
  65. package/dist/_chunks/index-B7cPaHEP.mjs.map +1 -0
  66. package/dist/_chunks/{index-PIkWT4fR.js → index-BVnfu10n.js} +255 -274
  67. package/dist/_chunks/index-BVnfu10n.js.map +1 -0
  68. package/dist/_chunks/{index-V3CiTkmR.mjs → index-BXqaoYHz.mjs} +239 -256
  69. package/dist/_chunks/index-BXqaoYHz.mjs.map +1 -0
  70. package/dist/_chunks/index-BbN-IN0z.js +366 -0
  71. package/dist/_chunks/index-BbN-IN0z.js.map +1 -0
  72. package/dist/_chunks/index-C02D7oHu-C1E7ADbJ.mjs +11984 -0
  73. package/dist/_chunks/index-C02D7oHu-C1E7ADbJ.mjs.map +1 -0
  74. package/dist/_chunks/index-C02D7oHu-fMZ4nmrb.js +12008 -0
  75. package/dist/_chunks/index-C02D7oHu-fMZ4nmrb.js.map +1 -0
  76. package/dist/_chunks/index-CoScqJGB.js +281 -0
  77. package/dist/_chunks/index-CoScqJGB.js.map +1 -0
  78. package/dist/_chunks/{index-j8_HHqx2.js → index-DL_kyirw.js} +107 -105
  79. package/dist/_chunks/index-DL_kyirw.js.map +1 -0
  80. package/dist/_chunks/{index-M6VUX9Xe.mjs → index-DsXSu1tx.mjs} +46 -50
  81. package/dist/_chunks/index-DsXSu1tx.mjs.map +1 -0
  82. package/dist/_chunks/{index-RINRWbs5.mjs → index-lmfzYgX7.mjs} +104 -102
  83. package/dist/_chunks/index-lmfzYgX7.mjs.map +1 -0
  84. package/dist/_chunks/index-ty5-lJ4i.mjs +262 -0
  85. package/dist/_chunks/index-ty5-lJ4i.mjs.map +1 -0
  86. package/dist/_chunks/{it-bvH7DgQo.mjs → it-B-rv0E24.mjs} +1 -1
  87. package/dist/_chunks/it-B-rv0E24.mjs.map +1 -0
  88. package/dist/_chunks/{it-YhZOlM2X.js → it-D1rH6V6_.js} +1 -1
  89. package/dist/_chunks/it-D1rH6V6_.js.map +1 -0
  90. package/dist/_chunks/{ja-o_-JPvQv.mjs → ja-C8K-VBPD.mjs} +1 -1
  91. package/dist/_chunks/ja-C8K-VBPD.mjs.map +1 -0
  92. package/dist/_chunks/{ja-xssHUXFv.js → ja-DqShgTMf.js} +1 -1
  93. package/dist/_chunks/ja-DqShgTMf.js.map +1 -0
  94. package/dist/_chunks/{ko-C3mHUSJa.js → ko-B9DGEPWH.js} +1 -1
  95. package/dist/_chunks/ko-B9DGEPWH.js.map +1 -0
  96. package/dist/_chunks/{ko-XJbPSez_.mjs → ko-Busb0wIY.mjs} +1 -1
  97. package/dist/_chunks/ko-Busb0wIY.mjs.map +1 -0
  98. package/dist/_chunks/{ms-II5Ea73J.mjs → ms-ByvsQjRt.mjs} +1 -1
  99. package/dist/_chunks/ms-ByvsQjRt.mjs.map +1 -0
  100. package/dist/_chunks/{ms-d0hfg65Z.js → ms-CPBU3LWf.js} +1 -1
  101. package/dist/_chunks/ms-CPBU3LWf.js.map +1 -0
  102. package/dist/_chunks/{nl-vEy6TN0K.mjs → nl-5qO8Rpcy.mjs} +1 -1
  103. package/dist/_chunks/nl-5qO8Rpcy.mjs.map +1 -0
  104. package/dist/_chunks/{nl-TA7TfK_5.js → nl-CwNB6YoO.js} +1 -1
  105. package/dist/_chunks/nl-CwNB6YoO.js.map +1 -0
  106. package/dist/_chunks/{pl-2VowaFGt.mjs → pl-BdIzifBE.mjs} +1 -1
  107. package/dist/_chunks/pl-BdIzifBE.mjs.map +1 -0
  108. package/dist/_chunks/{pl-0pUL9hdA.js → pl-Do9UD69f.js} +1 -1
  109. package/dist/_chunks/pl-Do9UD69f.js.map +1 -0
  110. package/dist/_chunks/{pt-Rf9W51IO.mjs → pt-BIO24ioG.mjs} +1 -1
  111. package/dist/_chunks/pt-BIO24ioG.mjs.map +1 -0
  112. package/dist/_chunks/{pt-BR-WNOhafR4.js → pt-BR-D7dZhxuP.js} +1 -1
  113. package/dist/_chunks/pt-BR-D7dZhxuP.js.map +1 -0
  114. package/dist/_chunks/{pt-BR-sS1Xp3Jt.mjs → pt-BR-f0p23AQZ.mjs} +1 -1
  115. package/dist/_chunks/pt-BR-f0p23AQZ.mjs.map +1 -0
  116. package/dist/_chunks/{pt-guNR9Gax.js → pt-fdvyOnUp.js} +1 -1
  117. package/dist/_chunks/pt-fdvyOnUp.js.map +1 -0
  118. package/dist/_chunks/{ru-X3BMXDds.js → ru-C94rjPGA.js} +1 -1
  119. package/dist/_chunks/ru-C94rjPGA.js.map +1 -0
  120. package/dist/_chunks/{ru-qKHnd5or.mjs → ru-VWy-IB7K.mjs} +1 -1
  121. package/dist/_chunks/ru-VWy-IB7K.mjs.map +1 -0
  122. package/dist/_chunks/{sk-NWPw1oTN.js → sk-BABEhykl.js} +1 -1
  123. package/dist/_chunks/sk-BABEhykl.js.map +1 -0
  124. package/dist/_chunks/{sk-_Ryr-eTT.mjs → sk-B_LIcepm.mjs} +1 -1
  125. package/dist/_chunks/sk-B_LIcepm.mjs.map +1 -0
  126. package/dist/_chunks/{sv-BqzScFXS.mjs → sv-ABLKOokl.mjs} +1 -1
  127. package/dist/_chunks/sv-ABLKOokl.mjs.map +1 -0
  128. package/dist/_chunks/{sv-76NnbB__.js → sv-Be43LhA9.js} +1 -1
  129. package/dist/_chunks/sv-Be43LhA9.js.map +1 -0
  130. package/dist/_chunks/{th-WsknMEpq.mjs → th-DKyP7ueR.mjs} +1 -1
  131. package/dist/_chunks/th-DKyP7ueR.mjs.map +1 -0
  132. package/dist/_chunks/{th-cbppX21D.js → th-DgVhVLhL.js} +1 -1
  133. package/dist/_chunks/th-DgVhVLhL.js.map +1 -0
  134. package/dist/_chunks/{tr-6mm_Fmz7.js → tr-B_idhkEs.js} +1 -1
  135. package/dist/_chunks/tr-B_idhkEs.js.map +1 -0
  136. package/dist/_chunks/{tr-_DB1F1GW.mjs → tr-qa1Q5UjC.mjs} +1 -1
  137. package/dist/_chunks/tr-qa1Q5UjC.mjs.map +1 -0
  138. package/dist/_chunks/{uk-yxMSQAwI.mjs → uk-BmRqbeQc.mjs} +1 -1
  139. package/dist/_chunks/uk-BmRqbeQc.mjs.map +1 -0
  140. package/dist/_chunks/{uk-sI2I1ogF.js → uk-LHOivnhP.js} +1 -1
  141. package/dist/_chunks/uk-LHOivnhP.js.map +1 -0
  142. package/dist/_chunks/{vi-A3zJxaiI.js → vi-CdVRdKDw.js} +1 -1
  143. package/dist/_chunks/vi-CdVRdKDw.js.map +1 -0
  144. package/dist/_chunks/{vi-xY0zCW3d.mjs → vi-HW-EdMea.mjs} +1 -1
  145. package/dist/_chunks/vi-HW-EdMea.mjs.map +1 -0
  146. package/dist/_chunks/{zh-OFeldzbX.mjs → zh-5hKkVPA4.mjs} +1 -1
  147. package/dist/_chunks/zh-5hKkVPA4.mjs.map +1 -0
  148. package/dist/_chunks/{zh-72SpmFXa.js → zh-Cuq8gMnF.js} +1 -1
  149. package/dist/_chunks/zh-Cuq8gMnF.js.map +1 -0
  150. package/dist/_chunks/{zh-Hans-E84cu4kP.mjs → zh-Hans-BHilK-yc.mjs} +1 -1
  151. package/dist/_chunks/zh-Hans-BHilK-yc.mjs.map +1 -0
  152. package/dist/_chunks/{zh-Hans-ArWWtyP4.js → zh-Hans-GQDMKtY4.js} +1 -1
  153. package/dist/_chunks/zh-Hans-GQDMKtY4.js.map +1 -0
  154. package/dist/admin/index.js +1 -2
  155. package/dist/admin/index.js.map +1 -1
  156. package/dist/admin/index.mjs +1 -2
  157. package/dist/admin/index.mjs.map +1 -1
  158. package/package.json +27 -28
  159. package/server/bootstrap/index.js +18 -51
  160. package/server/content-types/user/index.js +0 -1
  161. package/server/controllers/auth.js +40 -59
  162. package/server/controllers/content-manager-user.js +28 -30
  163. package/server/controllers/role.js +17 -4
  164. package/server/controllers/user.js +8 -9
  165. package/server/controllers/validation/auth.js +81 -25
  166. package/server/middlewares/rateLimit.js +1 -1
  167. package/server/register.js +1 -1
  168. package/server/services/jwt.js +3 -3
  169. package/server/services/permission.js +3 -7
  170. package/server/services/providers-registry.js +468 -279
  171. package/server/services/providers.js +10 -5
  172. package/server/services/role.js +15 -13
  173. package/server/services/user.js +56 -19
  174. package/server/services/users-permissions.js +15 -13
  175. package/server/utils/index.d.ts +2 -1
  176. package/server/utils/sanitize/sanitizers.js +7 -3
  177. package/server/utils/sanitize/visitors/remove-user-relation-from-role-entities.js +2 -2
  178. package/admin/src/pages/Roles/pages/ListPage/utils/api.js +0 -30
  179. package/dist/_chunks/ar-MvD8Ghac.mjs.map +0 -1
  180. package/dist/_chunks/ar-t5qTFaAD.js.map +0 -1
  181. package/dist/_chunks/cs-BMuXwxA1.mjs.map +0 -1
  182. package/dist/_chunks/cs-I8N4u-Sd.js.map +0 -1
  183. package/dist/_chunks/de-YTjtq89K.js.map +0 -1
  184. package/dist/_chunks/de-zs2qqc0W.mjs.map +0 -1
  185. package/dist/_chunks/dk-HctVBMsG.mjs.map +0 -1
  186. package/dist/_chunks/dk-TF-dWjzl.js.map +0 -1
  187. package/dist/_chunks/en-CE3wEy_c.mjs.map +0 -1
  188. package/dist/_chunks/en-m608rMZx.js.map +0 -1
  189. package/dist/_chunks/es-9381tih_.mjs.map +0 -1
  190. package/dist/_chunks/es-XBQsB8_9.js.map +0 -1
  191. package/dist/_chunks/fr-6cz3U-IF.js.map +0 -1
  192. package/dist/_chunks/fr-CMSc77If.mjs.map +0 -1
  193. package/dist/_chunks/id-RJ934rq-.js.map +0 -1
  194. package/dist/_chunks/id-SDuyIkZa.mjs.map +0 -1
  195. package/dist/_chunks/index--NjZI15Z.mjs +0 -301
  196. package/dist/_chunks/index--NjZI15Z.mjs.map +0 -1
  197. package/dist/_chunks/index-EFtzpYTe.mjs +0 -385
  198. package/dist/_chunks/index-EFtzpYTe.mjs.map +0 -1
  199. package/dist/_chunks/index-M6VUX9Xe.mjs.map +0 -1
  200. package/dist/_chunks/index-PIkWT4fR.js.map +0 -1
  201. package/dist/_chunks/index-RINRWbs5.mjs.map +0 -1
  202. package/dist/_chunks/index-V3CiTkmR.mjs.map +0 -1
  203. package/dist/_chunks/index-d2k7RBd6.js +0 -407
  204. package/dist/_chunks/index-d2k7RBd6.js.map +0 -1
  205. package/dist/_chunks/index-f7pS9YU1.js.map +0 -1
  206. package/dist/_chunks/index-j8_HHqx2.js.map +0 -1
  207. package/dist/_chunks/index-zhL5rDjK.js +0 -320
  208. package/dist/_chunks/index-zhL5rDjK.js.map +0 -1
  209. package/dist/_chunks/it-YhZOlM2X.js.map +0 -1
  210. package/dist/_chunks/it-bvH7DgQo.mjs.map +0 -1
  211. package/dist/_chunks/ja-o_-JPvQv.mjs.map +0 -1
  212. package/dist/_chunks/ja-xssHUXFv.js.map +0 -1
  213. package/dist/_chunks/ko-C3mHUSJa.js.map +0 -1
  214. package/dist/_chunks/ko-XJbPSez_.mjs.map +0 -1
  215. package/dist/_chunks/ms-II5Ea73J.mjs.map +0 -1
  216. package/dist/_chunks/ms-d0hfg65Z.js.map +0 -1
  217. package/dist/_chunks/nl-TA7TfK_5.js.map +0 -1
  218. package/dist/_chunks/nl-vEy6TN0K.mjs.map +0 -1
  219. package/dist/_chunks/pl-0pUL9hdA.js.map +0 -1
  220. package/dist/_chunks/pl-2VowaFGt.mjs.map +0 -1
  221. package/dist/_chunks/pt-BR-WNOhafR4.js.map +0 -1
  222. package/dist/_chunks/pt-BR-sS1Xp3Jt.mjs.map +0 -1
  223. package/dist/_chunks/pt-Rf9W51IO.mjs.map +0 -1
  224. package/dist/_chunks/pt-guNR9Gax.js.map +0 -1
  225. package/dist/_chunks/ru-X3BMXDds.js.map +0 -1
  226. package/dist/_chunks/ru-qKHnd5or.mjs.map +0 -1
  227. package/dist/_chunks/sk-NWPw1oTN.js.map +0 -1
  228. package/dist/_chunks/sk-_Ryr-eTT.mjs.map +0 -1
  229. package/dist/_chunks/sv-76NnbB__.js.map +0 -1
  230. package/dist/_chunks/sv-BqzScFXS.mjs.map +0 -1
  231. package/dist/_chunks/th-WsknMEpq.mjs.map +0 -1
  232. package/dist/_chunks/th-cbppX21D.js.map +0 -1
  233. package/dist/_chunks/tr-6mm_Fmz7.js.map +0 -1
  234. package/dist/_chunks/tr-_DB1F1GW.mjs.map +0 -1
  235. package/dist/_chunks/uk-sI2I1ogF.js.map +0 -1
  236. package/dist/_chunks/uk-yxMSQAwI.mjs.map +0 -1
  237. package/dist/_chunks/vi-A3zJxaiI.js.map +0 -1
  238. package/dist/_chunks/vi-xY0zCW3d.mjs.map +0 -1
  239. package/dist/_chunks/zh-72SpmFXa.js.map +0 -1
  240. package/dist/_chunks/zh-Hans-ArWWtyP4.js.map +0 -1
  241. package/dist/_chunks/zh-Hans-E84cu4kP.mjs.map +0 -1
  242. package/dist/_chunks/zh-OFeldzbX.mjs.map +0 -1
  243. package/server/bootstrap/grant-config.js +0 -140
  244. package/strapi-server.js +0 -3
@@ -57,4 +57,4 @@ const th = {
57
57
  export {
58
58
  th as default
59
59
  };
60
- //# sourceMappingURL=th-WsknMEpq.mjs.map
60
+ //# sourceMappingURL=th-DKyP7ueR.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"th-DKyP7ueR.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -57,4 +57,4 @@ const th = {
57
57
  "popUpWarning.warning.cancel": "คุณแน่ใจว่าต้องการยกเลิกการแก้ไขของคุณหรือไม่?"
58
58
  };
59
59
  exports.default = th;
60
- //# sourceMappingURL=th-cbppX21D.js.map
60
+ //# sourceMappingURL=th-DgVhVLhL.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"th-DgVhVLhL.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -82,4 +82,4 @@ const tr = {
82
82
  "popUpWarning.warning.cancel": "Değişiklikleri iptal etmek istediğinden emin misin?"
83
83
  };
84
84
  exports.default = tr;
85
- //# sourceMappingURL=tr-6mm_Fmz7.js.map
85
+ //# sourceMappingURL=tr-B_idhkEs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr-B_idhkEs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -82,4 +82,4 @@ const tr = {
82
82
  export {
83
83
  tr as default
84
84
  };
85
- //# sourceMappingURL=tr-_DB1F1GW.mjs.map
85
+ //# sourceMappingURL=tr-qa1Q5UjC.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tr-qa1Q5UjC.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -46,4 +46,4 @@ const uk = {
46
46
  export {
47
47
  uk as default
48
48
  };
49
- //# sourceMappingURL=uk-yxMSQAwI.mjs.map
49
+ //# sourceMappingURL=uk-BmRqbeQc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uk-BmRqbeQc.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -46,4 +46,4 @@ const uk = {
46
46
  "plugin.description.short": "Захистіть API за допомогою процесу аутентифікації на основі JWT"
47
47
  };
48
48
  exports.default = uk;
49
- //# sourceMappingURL=uk-sI2I1ogF.js.map
49
+ //# sourceMappingURL=uk-LHOivnhP.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uk-LHOivnhP.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -47,4 +47,4 @@ const vi = {
47
47
  "plugin.name": "Vai trò và Quyền"
48
48
  };
49
49
  exports.default = vi;
50
- //# sourceMappingURL=vi-A3zJxaiI.js.map
50
+ //# sourceMappingURL=vi-CdVRdKDw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-CdVRdKDw.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -47,4 +47,4 @@ const vi = {
47
47
  export {
48
48
  vi as default
49
49
  };
50
- //# sourceMappingURL=vi-xY0zCW3d.mjs.map
50
+ //# sourceMappingURL=vi-HW-EdMea.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vi-HW-EdMea.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -83,4 +83,4 @@ const zh = {
83
83
  export {
84
84
  zh as default
85
85
  };
86
- //# sourceMappingURL=zh-OFeldzbX.mjs.map
86
+ //# sourceMappingURL=zh-5hKkVPA4.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-5hKkVPA4.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -83,4 +83,4 @@ const zh = {
83
83
  "popUpWarning.warning.cancel": "您確定要取消變更嗎?"
84
84
  };
85
85
  exports.default = zh;
86
- //# sourceMappingURL=zh-72SpmFXa.js.map
86
+ //# sourceMappingURL=zh-Cuq8gMnF.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-Cuq8gMnF.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -83,4 +83,4 @@ const zhHans = {
83
83
  export {
84
84
  zhHans as default
85
85
  };
86
- //# sourceMappingURL=zh-Hans-E84cu4kP.mjs.map
86
+ //# sourceMappingURL=zh-Hans-BHilK-yc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-Hans-BHilK-yc.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -83,4 +83,4 @@ const zhHans = {
83
83
  "popUpWarning.warning.cancel": "你确定你要取消你的修改?"
84
84
  };
85
85
  exports.default = zhHans;
86
- //# sourceMappingURL=zh-Hans-ArWWtyP4.js.map
86
+ //# sourceMappingURL=zh-Hans-GQDMKtY4.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zh-Hans-GQDMKtY4.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-f7pS9YU1.js");
3
- require("@strapi/helper-plugin");
2
+ const index = require("../_chunks/index--y8LTL2j.js");
4
3
  module.exports = index.index;
5
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,5 +1,4 @@
1
- import { i } from "../_chunks/index-M6VUX9Xe.mjs";
2
- import "@strapi/helper-plugin";
1
+ import { i } from "../_chunks/index-DsXSu1tx.mjs";
3
2
  export {
4
3
  i as default
5
4
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/plugin-users-permissions",
3
- "version": "0.0.0-next.e9b6852d1c05518ff6e37d599321f7aa7aa0683b",
3
+ "version": "0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c",
4
4
  "description": "Protect your API with a full-authentication process based on JWT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,9 +27,9 @@
27
27
  "default": "./dist/admin/index.js"
28
28
  },
29
29
  "./strapi-server": {
30
- "source": "./strapi-server.js",
31
- "require": "./strapi-server.js",
32
- "default": "./strapi-server.js"
30
+ "source": "./server/index.js",
31
+ "require": "./server/index.js",
32
+ "default": "./server/index.js"
33
33
  },
34
34
  "./package.json": "./package.json"
35
35
  },
@@ -46,48 +46,47 @@
46
46
  "watch": "pack-up watch"
47
47
  },
48
48
  "dependencies": {
49
- "@strapi/design-system": "1.19.0",
50
- "@strapi/helper-plugin": "0.0.0-next.e9b6852d1c05518ff6e37d599321f7aa7aa0683b",
51
- "@strapi/icons": "1.19.0",
52
- "@strapi/utils": "0.0.0-next.e9b6852d1c05518ff6e37d599321f7aa7aa0683b",
49
+ "@strapi/design-system": "2.0.0-rc.11",
50
+ "@strapi/icons": "2.0.0-rc.11",
51
+ "@strapi/utils": "0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c",
53
52
  "bcryptjs": "2.4.3",
54
- "formik": "2.4.0",
53
+ "formik": "2.4.5",
55
54
  "grant-koa": "5.4.8",
56
- "immer": "9.0.19",
55
+ "immer": "9.0.21",
57
56
  "jsonwebtoken": "9.0.0",
58
57
  "jwk-to-pem": "2.0.5",
59
- "koa": "2.13.4",
60
- "koa2-ratelimit": "^1.1.2",
58
+ "koa": "2.15.2",
59
+ "koa2-ratelimit": "^1.1.3",
61
60
  "lodash": "4.17.21",
62
61
  "prop-types": "^15.8.1",
63
62
  "purest": "4.0.2",
64
- "react-intl": "6.4.1",
63
+ "react-intl": "6.6.2",
65
64
  "react-query": "3.39.3",
66
- "react-redux": "8.1.1",
65
+ "react-redux": "8.1.3",
67
66
  "url-join": "4.0.1",
68
67
  "yup": "0.32.9"
69
68
  },
70
69
  "devDependencies": {
71
- "@strapi/pack-up": "4.23.0",
72
- "@strapi/strapi": "0.0.0-next.e9b6852d1c05518ff6e37d599321f7aa7aa0683b",
73
- "@testing-library/dom": "9.2.0",
74
- "@testing-library/react": "14.0.0",
75
- "@testing-library/user-event": "14.4.3",
70
+ "@strapi/pack-up": "5.0.0",
71
+ "@strapi/strapi": "0.0.0-next.ee56af7ae29770097422de95c0d5500908dce15c",
72
+ "@testing-library/dom": "10.1.0",
73
+ "@testing-library/react": "15.0.7",
74
+ "@testing-library/user-event": "14.5.2",
76
75
  "msw": "1.3.0",
77
- "react": "^18.2.0",
78
- "react-dom": "^18.2.0",
79
- "react-router-dom": "5.3.4",
80
- "styled-components": "5.3.3"
76
+ "react": "18.3.1",
77
+ "react-dom": "18.3.1",
78
+ "react-router-dom": "6.22.3",
79
+ "styled-components": "6.1.8"
81
80
  },
82
81
  "peerDependencies": {
83
- "@strapi/strapi": "^4.0.0",
82
+ "@strapi/strapi": "^5.0.0 || ^5.0.0-beta || ^5.0.0-alpha || ^5.0.0-rc",
84
83
  "react": "^17.0.0 || ^18.0.0",
85
84
  "react-dom": "^17.0.0 || ^18.0.0",
86
- "react-router-dom": "^5.2.0",
87
- "styled-components": "^5.2.1"
85
+ "react-router-dom": "^6.0.0",
86
+ "styled-components": "^6.0.0"
88
87
  },
89
88
  "engines": {
90
- "node": ">=18.0.0 <=20.x.x",
89
+ "node": ">=18.0.0 <=22.x.x",
91
90
  "npm": ">=6.0.0"
92
91
  },
93
92
  "strapi": {
@@ -97,5 +96,5 @@
97
96
  "required": true,
98
97
  "kind": "plugin"
99
98
  },
100
- "gitHead": "e9b6852d1c05518ff6e37d599321f7aa7aa0683b"
99
+ "gitHead": "ee56af7ae29770097422de95c0d5500908dce15c"
101
100
  }
@@ -9,25 +9,26 @@
9
9
  */
10
10
  const crypto = require('crypto');
11
11
  const _ = require('lodash');
12
- const urljoin = require('url-join');
13
- const { isArray } = require('lodash/fp');
14
12
  const { getService } = require('../utils');
15
- const getGrantConfig = require('./grant-config');
16
-
17
13
  const usersPermissionsActions = require('./users-permissions-actions');
18
- const userSchema = require('../content-types/user');
19
14
 
20
15
  const initGrant = async (pluginStore) => {
21
- const apiPrefix = strapi.config.get('api.rest.prefix');
22
- const baseURL = urljoin(strapi.config.server.url, apiPrefix, 'auth');
16
+ const allProviders = getService('providers-registry').getAll();
17
+
18
+ const grantConfig = Object.entries(allProviders).reduce((acc, [name, provider]) => {
19
+ const { icon, enabled, grantConfig } = provider;
23
20
 
24
- const grantConfig = getGrantConfig(baseURL);
21
+ acc[name] = {
22
+ icon,
23
+ enabled,
24
+ ...grantConfig,
25
+ };
26
+ return acc;
27
+ }, {});
25
28
 
26
29
  const prevGrantConfig = (await pluginStore.get({ key: 'grant' })) || {};
27
- // store grant auth config to db
28
- // when plugin_users-permissions_grant is not existed in db
29
- // or we have added/deleted provider here.
30
- if (!prevGrantConfig || !_.isEqual(_.keys(prevGrantConfig), _.keys(grantConfig))) {
30
+
31
+ if (!prevGrantConfig || !_.isEqual(prevGrantConfig, grantConfig)) {
31
32
  // merge with the previous provider config.
32
33
  _.keys(grantConfig).forEach((key) => {
33
34
  if (key in prevGrantConfig) {
@@ -99,27 +100,6 @@ const initAdvancedOptions = async (pluginStore) => {
99
100
  }
100
101
  };
101
102
 
102
- const userSchemaAdditions = () => {
103
- const defaultSchema = Object.keys(userSchema.attributes);
104
- const currentSchema = Object.keys(
105
- strapi.contentTypes['plugin::users-permissions.user'].attributes
106
- );
107
-
108
- // Some dynamic fields may not have been initialized yet, so we need to ignore them
109
- // TODO: we should have a global method for finding these
110
- const ignoreDiffs = [
111
- 'createdBy',
112
- 'createdAt',
113
- 'updatedBy',
114
- 'updatedAt',
115
- 'publishedAt',
116
- 'strapi_stage',
117
- 'strapi_assignee',
118
- ];
119
-
120
- return currentSchema.filter((key) => !(ignoreDiffs.includes(key) || defaultSchema.includes(key)));
121
- };
122
-
123
103
  module.exports = async ({ strapi }) => {
124
104
  const pluginStore = strapi.store({ type: 'plugin', name: 'users-permissions' });
125
105
 
@@ -127,13 +107,13 @@ module.exports = async ({ strapi }) => {
127
107
  await initEmails(pluginStore);
128
108
  await initAdvancedOptions(pluginStore);
129
109
 
130
- await strapi.admin.services.permission.actionProvider.registerMany(
131
- usersPermissionsActions.actions
132
- );
110
+ await strapi
111
+ .service('admin::permission')
112
+ .actionProvider.registerMany(usersPermissionsActions.actions);
133
113
 
134
114
  await getService('users-permissions').initialize();
135
115
 
136
- if (!strapi.config.get('plugin.users-permissions.jwtSecret')) {
116
+ if (!strapi.config.get('plugin::users-permissions.jwtSecret')) {
137
117
  if (process.env.NODE_ENV !== 'development') {
138
118
  throw new Error(
139
119
  `Missing jwtSecret. Please, set configuration variable "jwtSecret" for the users-permissions plugin in config/plugins.js (ex: you can generate one using Node with \`crypto.randomBytes(16).toString('base64')\`).
@@ -143,7 +123,7 @@ For security reasons, prefer storing the secret in an environment variable and r
143
123
 
144
124
  const jwtSecret = crypto.randomBytes(16).toString('base64');
145
125
 
146
- strapi.config.set('plugin.users-permissions.jwtSecret', jwtSecret);
126
+ strapi.config.set('plugin::users-permissions.jwtSecret', jwtSecret);
147
127
 
148
128
  if (!process.env.JWT_SECRET) {
149
129
  const envPath = process.env.ENV_PATH || '.env';
@@ -153,17 +133,4 @@ For security reasons, prefer storing the secret in an environment variable and r
153
133
  );
154
134
  }
155
135
  }
156
-
157
- // TODO v5: Remove this block of code and default allowedFields to empty array
158
- if (!isArray(strapi.config.get('plugin.users-permissions.register.allowedFields'))) {
159
- const modifications = userSchemaAdditions();
160
- if (modifications.length > 0) {
161
- // if there is a potential vulnerability, show a warning
162
- strapi.log.warn(
163
- `Users-permissions registration has defaulted to accepting the following additional user fields during registration: ${modifications.join(
164
- ','
165
- )}`
166
- );
167
- }
168
- }
169
136
  };
@@ -12,7 +12,6 @@ module.exports = {
12
12
  displayName: 'User',
13
13
  },
14
14
  options: {
15
- draftAndPublish: false,
16
15
  timestamps: true,
17
16
  },
18
17
  attributes: {
@@ -11,9 +11,6 @@ const crypto = require('crypto');
11
11
  const _ = require('lodash');
12
12
  const { concat, compact, isArray } = require('lodash/fp');
13
13
  const utils = require('@strapi/utils');
14
- const {
15
- contentTypes: { getNonWritableAttributes },
16
- } = require('@strapi/utils');
17
14
  const { getService } = require('../utils');
18
15
  const {
19
16
  validateCallbackBody,
@@ -25,17 +22,16 @@ const {
25
22
  validateChangePasswordBody,
26
23
  } = require('./validation/auth');
27
24
 
28
- const { getAbsoluteAdminUrl, getAbsoluteServerUrl, sanitize } = utils;
29
25
  const { ApplicationError, ValidationError, ForbiddenError } = utils.errors;
30
26
 
31
27
  const sanitizeUser = (user, ctx) => {
32
28
  const { auth } = ctx.state;
33
29
  const userSchema = strapi.getModel('plugin::users-permissions.user');
34
30
 
35
- return sanitize.contentAPI.output(user, userSchema, { auth });
31
+ return strapi.contentAPI.sanitize.output(user, userSchema, { auth });
36
32
  };
37
33
 
38
- module.exports = {
34
+ module.exports = ({ strapi }) => ({
39
35
  async callback(ctx) {
40
36
  const provider = ctx.params.provider || 'local';
41
37
  const params = ctx.request.body;
@@ -55,7 +51,7 @@ module.exports = {
55
51
  const { identifier } = params;
56
52
 
57
53
  // Check if the user exists.
58
- const user = await strapi.query('plugin::users-permissions.user').findOne({
54
+ const user = await strapi.db.query('plugin::users-permissions.user').findOne({
59
55
  where: {
60
56
  provider,
61
57
  $or: [{ email: identifier.toLowerCase() }, { username: identifier }],
@@ -118,13 +114,17 @@ module.exports = {
118
114
  throw new ApplicationError('You must be authenticated to reset your password');
119
115
  }
120
116
 
121
- const { currentPassword, password } = await validateChangePasswordBody(ctx.request.body);
117
+ const validations = strapi.config.get('plugin::users-permissions.validationRules');
122
118
 
123
- const user = await strapi.entityService.findOne(
124
- 'plugin::users-permissions.user',
125
- ctx.state.user.id
119
+ const { currentPassword, password } = await validateChangePasswordBody(
120
+ ctx.request.body,
121
+ validations
126
122
  );
127
123
 
124
+ const user = await strapi.db
125
+ .query('plugin::users-permissions.user')
126
+ .findOne({ where: { id: ctx.state.user.id } });
127
+
128
128
  const validPassword = await getService('user').validatePassword(currentPassword, user.password);
129
129
 
130
130
  if (!validPassword) {
@@ -144,15 +144,18 @@ module.exports = {
144
144
  },
145
145
 
146
146
  async resetPassword(ctx) {
147
+ const validations = strapi.config.get('plugin::users-permissions.validationRules');
148
+
147
149
  const { password, passwordConfirmation, code } = await validateResetPasswordBody(
148
- ctx.request.body
150
+ ctx.request.body,
151
+ validations
149
152
  );
150
153
 
151
154
  if (password !== passwordConfirmation) {
152
155
  throw new ValidationError('Passwords do not match');
153
156
  }
154
157
 
155
- const user = await strapi
158
+ const user = await strapi.db
156
159
  .query('plugin::users-permissions.user')
157
160
  .findOne({ where: { resetPasswordToken: code } });
158
161
 
@@ -237,7 +240,7 @@ module.exports = {
237
240
  const advancedSettings = await pluginStore.get({ key: 'advanced' });
238
241
 
239
242
  // Find the user by email.
240
- const user = await strapi
243
+ const user = await strapi.db
241
244
  .query('plugin::users-permissions.user')
242
245
  .findOne({ where: { email: email.toLowerCase() } });
243
246
 
@@ -255,8 +258,8 @@ module.exports = {
255
258
  resetPasswordSettings.message,
256
259
  {
257
260
  URL: advancedSettings.email_reset_password,
258
- SERVER_URL: getAbsoluteServerUrl(strapi.config),
259
- ADMIN_URL: getAbsoluteAdminUrl(strapi.config),
261
+ SERVER_URL: strapi.config.get('server.absoluteUrl'),
262
+ ADMIN_URL: strapi.config.get('admin.absoluteUrl'),
260
263
  USER: userInfo,
261
264
  TOKEN: resetPasswordToken,
262
265
  }
@@ -299,55 +302,32 @@ module.exports = {
299
302
  throw new ApplicationError('Register action is currently disabled');
300
303
  }
301
304
 
302
- const { register } = strapi.config.get('plugin.users-permissions');
305
+ const { register } = strapi.config.get('plugin::users-permissions');
303
306
  const alwaysAllowedKeys = ['username', 'password', 'email'];
304
- const userModel = strapi.contentTypes['plugin::users-permissions.user'];
305
- const { attributes } = userModel;
306
-
307
- const nonWritable = getNonWritableAttributes(userModel);
308
307
 
308
+ // Note that we intentionally do not filter allowedFields to allow a project to explicitly accept private or other Strapi field on registration
309
309
  const allowedKeys = compact(
310
- concat(
311
- alwaysAllowedKeys,
312
- isArray(register?.allowedFields)
313
- ? // Note that we do not filter allowedFields in case a user explicitly chooses to allow a private or otherwise omitted field on registration
314
- register.allowedFields // if null or undefined, compact will remove it
315
- : // to prevent breaking changes, if allowedFields is not set in config, we only remove private and known dangerous user schema fields
316
- // TODO V5: allowedFields defaults to [] when undefined and remove this case
317
- Object.keys(attributes).filter(
318
- (key) =>
319
- !nonWritable.includes(key) &&
320
- !attributes[key].private &&
321
- ![
322
- // many of these are included in nonWritable, but we'll list them again to be safe and since we're removing this code in v5 anyway
323
- // Strapi user schema fields
324
- 'confirmed',
325
- 'blocked',
326
- 'confirmationToken',
327
- 'resetPasswordToken',
328
- 'provider',
329
- 'id',
330
- 'role',
331
- // other Strapi fields that might be added
332
- 'createdAt',
333
- 'updatedAt',
334
- 'createdBy',
335
- 'updatedBy',
336
- 'publishedAt', // d&p
337
- 'strapi_reviewWorkflows_stage', // review workflows
338
- ].includes(key)
339
- )
340
- )
310
+ concat(alwaysAllowedKeys, isArray(register?.allowedFields) ? register.allowedFields : [])
341
311
  );
342
312
 
313
+ // Check if there are any keys in requestBody that are not in allowedKeys
314
+ const invalidKeys = Object.keys(ctx.request.body).filter((key) => !allowedKeys.includes(key));
315
+
316
+ if (invalidKeys.length > 0) {
317
+ // If there are invalid keys, throw an error
318
+ throw new ValidationError(`Invalid parameters: ${invalidKeys.join(', ')}`);
319
+ }
320
+
343
321
  const params = {
344
322
  ..._.pick(ctx.request.body, allowedKeys),
345
323
  provider: 'local',
346
324
  };
347
325
 
348
- await validateRegisterBody(params);
326
+ const validations = strapi.config.get('plugin::users-permissions.validationRules');
349
327
 
350
- const role = await strapi
328
+ await validateRegisterBody(params, validations);
329
+
330
+ const role = await strapi.db
351
331
  .query('plugin::users-permissions.role')
352
332
  .findOne({ where: { type: settings.default_role } });
353
333
 
@@ -366,7 +346,7 @@ module.exports = {
366
346
  ],
367
347
  };
368
348
 
369
- const conflictingUserCount = await strapi.query('plugin::users-permissions.user').count({
349
+ const conflictingUserCount = await strapi.db.query('plugin::users-permissions.user').count({
370
350
  where: { ...identifierFilter, provider },
371
351
  });
372
352
 
@@ -375,7 +355,7 @@ module.exports = {
375
355
  }
376
356
 
377
357
  if (settings.unique_email) {
378
- const conflictingUserCount = await strapi.query('plugin::users-permissions.user').count({
358
+ const conflictingUserCount = await strapi.db.query('plugin::users-permissions.user').count({
379
359
  where: { ...identifierFilter },
380
360
  });
381
361
 
@@ -400,7 +380,8 @@ module.exports = {
400
380
  try {
401
381
  await getService('user').sendConfirmationEmail(sanitizedUser);
402
382
  } catch (err) {
403
- throw new ApplicationError(err.message);
383
+ strapi.log.error(err);
384
+ throw new ApplicationError('Error sending confirmation email');
404
385
  }
405
386
 
406
387
  return ctx.send({ user: sanitizedUser });
@@ -445,7 +426,7 @@ module.exports = {
445
426
  async sendEmailConfirmation(ctx) {
446
427
  const { email } = await validateSendEmailConfirmationBody(ctx.request.body);
447
428
 
448
- const user = await strapi.query('plugin::users-permissions.user').findOne({
429
+ const user = await strapi.db.query('plugin::users-permissions.user').findOne({
449
430
  where: { email: email.toLowerCase() },
450
431
  });
451
432
 
@@ -468,4 +449,4 @@ module.exports = {
468
449
  sent: true,
469
450
  });
470
451
  },
471
- };
452
+ });