@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.
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +55 -41
- package/strapi-server.js +3 -3
- package/dist/_chunks/AuthenticatedApp-342bf22f.js +0 -1476
- package/dist/_chunks/AuthenticatedApp-342bf22f.js.map +0 -1
- package/dist/_chunks/AuthenticatedApp-bb31f306.mjs +0 -1450
- package/dist/_chunks/AuthenticatedApp-bb31f306.mjs.map +0 -1
- package/dist/_chunks/DragLayer-bff96835.mjs +0 -44
- package/dist/_chunks/DragLayer-bff96835.mjs.map +0 -1
- package/dist/_chunks/DragLayer-f07eee6c.js +0 -43
- package/dist/_chunks/DragLayer-f07eee6c.js.map +0 -1
- package/dist/_chunks/HomePage-0c7717c0.mjs +0 -49
- package/dist/_chunks/HomePage-0c7717c0.mjs.map +0 -1
- package/dist/_chunks/HomePage-175f79c7.js +0 -49
- package/dist/_chunks/HomePage-175f79c7.js.map +0 -1
- package/dist/_chunks/HomePage-246cc590.mjs +0 -542
- package/dist/_chunks/HomePage-246cc590.mjs.map +0 -1
- package/dist/_chunks/HomePage-6ff9e578.js +0 -563
- package/dist/_chunks/HomePage-6ff9e578.js.map +0 -1
- package/dist/_chunks/InstalledPluginsPage-170aff77.mjs +0 -134
- package/dist/_chunks/InstalledPluginsPage-170aff77.mjs.map +0 -1
- package/dist/_chunks/InstalledPluginsPage-3ae5dbb6.js +0 -153
- package/dist/_chunks/InstalledPluginsPage-3ae5dbb6.js.map +0 -1
- package/dist/_chunks/InternalErrorPage-040dc993.mjs +0 -41
- package/dist/_chunks/InternalErrorPage-040dc993.mjs.map +0 -1
- package/dist/_chunks/InternalErrorPage-d0e51ac2.js +0 -41
- package/dist/_chunks/InternalErrorPage-d0e51ac2.js.map +0 -1
- package/dist/_chunks/Layout-4b3e434a.js +0 -92
- package/dist/_chunks/Layout-4b3e434a.js.map +0 -1
- package/dist/_chunks/Layout-72fa2ace.mjs +0 -90
- package/dist/_chunks/Layout-72fa2ace.mjs.map +0 -1
- package/dist/_chunks/LimitsModal-203482b8.js +0 -84
- package/dist/_chunks/LimitsModal-203482b8.js.map +0 -1
- package/dist/_chunks/LimitsModal-da04700e.mjs +0 -82
- package/dist/_chunks/LimitsModal-da04700e.mjs.map +0 -1
- package/dist/_chunks/Login-576bbc11.js +0 -64
- package/dist/_chunks/Login-576bbc11.js.map +0 -1
- package/dist/_chunks/Login-d627bb0a.mjs +0 -62
- package/dist/_chunks/Login-d627bb0a.mjs.map +0 -1
- package/dist/_chunks/MarketplacePage-1cbfa8fd.mjs +0 -1011
- package/dist/_chunks/MarketplacePage-1cbfa8fd.mjs.map +0 -1
- package/dist/_chunks/MarketplacePage-e7cd973b.js +0 -1035
- package/dist/_chunks/MarketplacePage-e7cd973b.js.map +0 -1
- package/dist/_chunks/ProfilePage-52844daa.js +0 -665
- package/dist/_chunks/ProfilePage-52844daa.js.map +0 -1
- package/dist/_chunks/ProfilePage-ef400907.mjs +0 -642
- package/dist/_chunks/ProfilePage-ef400907.mjs.map +0 -1
- package/dist/_chunks/SSOProviders-62bfad92.mjs +0 -58
- package/dist/_chunks/SSOProviders-62bfad92.mjs.map +0 -1
- package/dist/_chunks/SSOProviders-b395a4e6.js +0 -59
- package/dist/_chunks/SSOProviders-b395a4e6.js.map +0 -1
- package/dist/_chunks/SalesPage-4a0a68fb.js +0 -51
- package/dist/_chunks/SalesPage-4a0a68fb.js.map +0 -1
- package/dist/_chunks/SalesPage-56bf9463.mjs +0 -48
- package/dist/_chunks/SalesPage-56bf9463.mjs.map +0 -1
- package/dist/_chunks/SalesPage-66f9ea32.js +0 -51
- package/dist/_chunks/SalesPage-66f9ea32.js.map +0 -1
- package/dist/_chunks/SalesPage-d0cdc1a7.js +0 -48
- package/dist/_chunks/SalesPage-d0cdc1a7.js.map +0 -1
- package/dist/_chunks/SalesPage-f9597ae7.mjs +0 -51
- package/dist/_chunks/SalesPage-f9597ae7.mjs.map +0 -1
- package/dist/_chunks/SalesPage-fceedf48.mjs +0 -51
- package/dist/_chunks/SalesPage-fceedf48.mjs.map +0 -1
- package/dist/_chunks/ar-21279f4c.js +0 -936
- package/dist/_chunks/ar-21279f4c.js.map +0 -1
- package/dist/_chunks/ar-62e5e2b3.mjs +0 -936
- package/dist/_chunks/ar-62e5e2b3.mjs.map +0 -1
- package/dist/_chunks/build-1026ce7c.mjs +0 -68
- package/dist/_chunks/build-1026ce7c.mjs.map +0 -1
- package/dist/_chunks/build-d99bcc06.js +0 -68
- package/dist/_chunks/build-d99bcc06.js.map +0 -1
- package/dist/_chunks/ca-d05fb350.js +0 -724
- package/dist/_chunks/ca-d05fb350.js.map +0 -1
- package/dist/_chunks/ca-e99de225.mjs +0 -724
- package/dist/_chunks/ca-e99de225.mjs.map +0 -1
- package/dist/_chunks/colors-c24a54f0.js +0 -33
- package/dist/_chunks/colors-c24a54f0.js.map +0 -1
- package/dist/_chunks/colors-e7489dd4.mjs +0 -34
- package/dist/_chunks/colors-e7489dd4.mjs.map +0 -1
- package/dist/_chunks/constants-2a8f4e41.mjs +0 -11
- package/dist/_chunks/constants-2a8f4e41.mjs.map +0 -1
- package/dist/_chunks/constants-40ffa931.js +0 -11
- package/dist/_chunks/constants-40ffa931.js.map +0 -1
- package/dist/_chunks/constants-4aca55b6.js +0 -85
- package/dist/_chunks/constants-4aca55b6.js.map +0 -1
- package/dist/_chunks/constants-64899732.js +0 -30
- package/dist/_chunks/constants-64899732.js.map +0 -1
- package/dist/_chunks/constants-6c68e9a0.js +0 -229
- package/dist/_chunks/constants-6c68e9a0.js.map +0 -1
- package/dist/_chunks/constants-6ecddc43.mjs +0 -111
- package/dist/_chunks/constants-6ecddc43.mjs.map +0 -1
- package/dist/_chunks/constants-74b8a935.mjs +0 -52
- package/dist/_chunks/constants-74b8a935.mjs.map +0 -1
- package/dist/_chunks/constants-7596f6f3.js +0 -132
- package/dist/_chunks/constants-7596f6f3.js.map +0 -1
- package/dist/_chunks/constants-8092eeb5.mjs +0 -59
- package/dist/_chunks/constants-8092eeb5.mjs.map +0 -1
- package/dist/_chunks/constants-85da8cc4.js +0 -58
- package/dist/_chunks/constants-85da8cc4.js.map +0 -1
- package/dist/_chunks/constants-a6fd64fc.mjs +0 -80
- package/dist/_chunks/constants-a6fd64fc.mjs.map +0 -1
- package/dist/_chunks/constants-a92ce583.mjs +0 -7
- package/dist/_chunks/constants-a92ce583.mjs.map +0 -1
- package/dist/_chunks/constants-ae0b83df.mjs +0 -227
- package/dist/_chunks/constants-ae0b83df.mjs.map +0 -1
- package/dist/_chunks/constants-c1f1f698.mjs +0 -85
- package/dist/_chunks/constants-c1f1f698.mjs.map +0 -1
- package/dist/_chunks/constants-d3dd8ed6.mjs +0 -7
- package/dist/_chunks/constants-d3dd8ed6.mjs.map +0 -1
- package/dist/_chunks/constants-d5d67ca8.js +0 -6
- package/dist/_chunks/constants-d5d67ca8.js.map +0 -1
- package/dist/_chunks/constants-da2542a3.js +0 -6
- package/dist/_chunks/constants-da2542a3.js.map +0 -1
- package/dist/_chunks/constants-ddd2d586.js +0 -82
- package/dist/_chunks/constants-ddd2d586.js.map +0 -1
- package/dist/_chunks/constants-def33545.mjs +0 -30
- package/dist/_chunks/constants-def33545.mjs.map +0 -1
- package/dist/_chunks/constants-e05f06d4.js +0 -52
- package/dist/_chunks/constants-e05f06d4.js.map +0 -1
- package/dist/_chunks/cs-2fa881a2.mjs +0 -291
- package/dist/_chunks/cs-2fa881a2.mjs.map +0 -1
- package/dist/_chunks/cs-eee75b10.js +0 -291
- package/dist/_chunks/cs-eee75b10.js.map +0 -1
- package/dist/_chunks/de-28f8bc28.mjs +0 -716
- package/dist/_chunks/de-28f8bc28.mjs.map +0 -1
- package/dist/_chunks/de-976cc986.js +0 -716
- package/dist/_chunks/de-976cc986.js.map +0 -1
- package/dist/_chunks/develop-72394876.mjs +0 -61
- package/dist/_chunks/develop-72394876.mjs.map +0 -1
- package/dist/_chunks/develop-da585b1e.js +0 -61
- package/dist/_chunks/develop-da585b1e.js.map +0 -1
- package/dist/_chunks/dk-0b759a56.mjs +0 -634
- package/dist/_chunks/dk-0b759a56.mjs.map +0 -1
- package/dist/_chunks/dk-6189917e.js +0 -634
- package/dist/_chunks/dk-6189917e.js.map +0 -1
- package/dist/_chunks/edit-29bdf5d6.js +0 -50
- package/dist/_chunks/edit-29bdf5d6.js.map +0 -1
- package/dist/_chunks/edit-923cefa0.mjs +0 -32
- package/dist/_chunks/edit-923cefa0.mjs.map +0 -1
- package/dist/_chunks/en-0e9e9327.js +0 -1022
- package/dist/_chunks/en-0e9e9327.js.map +0 -1
- package/dist/_chunks/en-e728accb.mjs +0 -1022
- package/dist/_chunks/en-e728accb.mjs.map +0 -1
- package/dist/_chunks/es-18b29db2.mjs +0 -796
- package/dist/_chunks/es-18b29db2.mjs.map +0 -1
- package/dist/_chunks/es-3ee0992a.js +0 -796
- package/dist/_chunks/es-3ee0992a.js.map +0 -1
- package/dist/_chunks/eu-8fd773c2.mjs +0 -832
- package/dist/_chunks/eu-8fd773c2.mjs.map +0 -1
- package/dist/_chunks/eu-be749f31.js +0 -832
- package/dist/_chunks/eu-be749f31.js.map +0 -1
- package/dist/_chunks/formatAPIErrors-b599cf27.js +0 -20
- package/dist/_chunks/formatAPIErrors-b599cf27.js.map +0 -1
- package/dist/_chunks/formatAPIErrors-db6ed675.mjs +0 -21
- package/dist/_chunks/formatAPIErrors-db6ed675.mjs.map +0 -1
- package/dist/_chunks/fr-29c84e1f.js +0 -762
- package/dist/_chunks/fr-29c84e1f.js.map +0 -1
- package/dist/_chunks/fr-f37df086.mjs +0 -762
- package/dist/_chunks/fr-f37df086.mjs.map +0 -1
- package/dist/_chunks/gu-377a4b46.js +0 -623
- package/dist/_chunks/gu-377a4b46.js.map +0 -1
- package/dist/_chunks/gu-69f0e13a.mjs +0 -623
- package/dist/_chunks/gu-69f0e13a.mjs.map +0 -1
- package/dist/_chunks/he-aec27352.js +0 -326
- package/dist/_chunks/he-aec27352.js.map +0 -1
- package/dist/_chunks/he-bd769d7e.mjs +0 -326
- package/dist/_chunks/he-bd769d7e.mjs.map +0 -1
- package/dist/_chunks/hi-1bdc7a46.js +0 -722
- package/dist/_chunks/hi-1bdc7a46.js.map +0 -1
- package/dist/_chunks/hi-d397a24b.mjs +0 -722
- package/dist/_chunks/hi-d397a24b.mjs.map +0 -1
- package/dist/_chunks/hu-e2c05f40.js +0 -832
- package/dist/_chunks/hu-e2c05f40.js.map +0 -1
- package/dist/_chunks/hu-eb88bd0c.mjs +0 -832
- package/dist/_chunks/hu-eb88bd0c.mjs.map +0 -1
- package/dist/_chunks/id-586df3a2.js +0 -448
- package/dist/_chunks/id-586df3a2.js.map +0 -1
- package/dist/_chunks/id-f47699e6.mjs +0 -448
- package/dist/_chunks/id-f47699e6.mjs.map +0 -1
- package/dist/_chunks/index-10a05917.mjs +0 -51
- package/dist/_chunks/index-10a05917.mjs.map +0 -1
- package/dist/_chunks/index-115d317b.mjs +0 -244
- package/dist/_chunks/index-115d317b.mjs.map +0 -1
- package/dist/_chunks/index-171715e4.js +0 -697
- package/dist/_chunks/index-171715e4.js.map +0 -1
- package/dist/_chunks/index-176cc121.mjs +0 -469
- package/dist/_chunks/index-176cc121.mjs.map +0 -1
- package/dist/_chunks/index-1bac5263.js +0 -338
- package/dist/_chunks/index-1bac5263.js.map +0 -1
- package/dist/_chunks/index-200c5a6a.js +0 -51
- package/dist/_chunks/index-200c5a6a.js.map +0 -1
- package/dist/_chunks/index-215b5421.mjs +0 -51
- package/dist/_chunks/index-215b5421.mjs.map +0 -1
- package/dist/_chunks/index-23401c29.js +0 -418
- package/dist/_chunks/index-23401c29.js.map +0 -1
- package/dist/_chunks/index-242c859c.js +0 -335
- package/dist/_chunks/index-242c859c.js.map +0 -1
- package/dist/_chunks/index-26fcb3ca.mjs +0 -1432
- package/dist/_chunks/index-26fcb3ca.mjs.map +0 -1
- package/dist/_chunks/index-28dd9303.mjs +0 -51
- package/dist/_chunks/index-28dd9303.mjs.map +0 -1
- package/dist/_chunks/index-296c14bf.mjs +0 -362
- package/dist/_chunks/index-296c14bf.mjs.map +0 -1
- package/dist/_chunks/index-2de06c32.js +0 -51
- package/dist/_chunks/index-2de06c32.js.map +0 -1
- package/dist/_chunks/index-2eb69b5d.mjs +0 -399
- package/dist/_chunks/index-2eb69b5d.mjs.map +0 -1
- package/dist/_chunks/index-2f61e3ae.js +0 -585
- package/dist/_chunks/index-2f61e3ae.js.map +0 -1
- package/dist/_chunks/index-308b73ba.mjs +0 -60
- package/dist/_chunks/index-308b73ba.mjs.map +0 -1
- package/dist/_chunks/index-34e41e15.js +0 -134
- package/dist/_chunks/index-34e41e15.js.map +0 -1
- package/dist/_chunks/index-38115cde.js +0 -66
- package/dist/_chunks/index-38115cde.js.map +0 -1
- package/dist/_chunks/index-383efae4.mjs +0 -55
- package/dist/_chunks/index-383efae4.mjs.map +0 -1
- package/dist/_chunks/index-3b426575.js +0 -47
- package/dist/_chunks/index-3b426575.js.map +0 -1
- package/dist/_chunks/index-47af1603.js +0 -253
- package/dist/_chunks/index-47af1603.js.map +0 -1
- package/dist/_chunks/index-49b7e6ff.mjs +0 -1266
- package/dist/_chunks/index-49b7e6ff.mjs.map +0 -1
- package/dist/_chunks/index-4d9b2cb9.js +0 -47
- package/dist/_chunks/index-4d9b2cb9.js.map +0 -1
- package/dist/_chunks/index-4de70b5d.js +0 -3404
- package/dist/_chunks/index-4de70b5d.js.map +0 -1
- package/dist/_chunks/index-59b1f604.js +0 -380
- package/dist/_chunks/index-59b1f604.js.map +0 -1
- package/dist/_chunks/index-5a5217e0.mjs +0 -308
- package/dist/_chunks/index-5a5217e0.mjs.map +0 -1
- package/dist/_chunks/index-5da07c41.js +0 -418
- package/dist/_chunks/index-5da07c41.js.map +0 -1
- package/dist/_chunks/index-600cb5dd.js +0 -51
- package/dist/_chunks/index-600cb5dd.js.map +0 -1
- package/dist/_chunks/index-608d8d10.mjs +0 -393
- package/dist/_chunks/index-608d8d10.mjs.map +0 -1
- package/dist/_chunks/index-74812118.mjs +0 -53
- package/dist/_chunks/index-74812118.mjs.map +0 -1
- package/dist/_chunks/index-7d578921.js +0 -847
- package/dist/_chunks/index-7d578921.js.map +0 -1
- package/dist/_chunks/index-8109fa91.mjs +0 -676
- package/dist/_chunks/index-8109fa91.mjs.map +0 -1
- package/dist/_chunks/index-82c7a120.js +0 -15401
- package/dist/_chunks/index-82c7a120.js.map +0 -1
- package/dist/_chunks/index-83d53962.js +0 -62
- package/dist/_chunks/index-83d53962.js.map +0 -1
- package/dist/_chunks/index-88298941.js +0 -54
- package/dist/_chunks/index-88298941.js.map +0 -1
- package/dist/_chunks/index-8933483b.mjs +0 -3374
- package/dist/_chunks/index-8933483b.mjs.map +0 -1
- package/dist/_chunks/index-91df57b1.mjs +0 -826
- package/dist/_chunks/index-91df57b1.mjs.map +0 -1
- package/dist/_chunks/index-973c363e.mjs +0 -63
- package/dist/_chunks/index-973c363e.mjs.map +0 -1
- package/dist/_chunks/index-989bbeec.mjs +0 -232
- package/dist/_chunks/index-989bbeec.mjs.map +0 -1
- package/dist/_chunks/index-9910dda4.js +0 -55
- package/dist/_chunks/index-9910dda4.js.map +0 -1
- package/dist/_chunks/index-9afb163a.js +0 -418
- package/dist/_chunks/index-9afb163a.js.map +0 -1
- package/dist/_chunks/index-9f61bef8.js +0 -51
- package/dist/_chunks/index-9f61bef8.js.map +0 -1
- package/dist/_chunks/index-ab31623a.mjs +0 -273
- package/dist/_chunks/index-ab31623a.mjs.map +0 -1
- package/dist/_chunks/index-ac85118a.mjs +0 -47
- package/dist/_chunks/index-ac85118a.mjs.map +0 -1
- package/dist/_chunks/index-ad8e55c0.mjs +0 -866
- package/dist/_chunks/index-ad8e55c0.mjs.map +0 -1
- package/dist/_chunks/index-aedeaf5a.js +0 -311
- package/dist/_chunks/index-aedeaf5a.js.map +0 -1
- package/dist/_chunks/index-bbac142a.js +0 -125
- package/dist/_chunks/index-bbac142a.js.map +0 -1
- package/dist/_chunks/index-bd18f803.mjs +0 -15320
- package/dist/_chunks/index-bd18f803.mjs.map +0 -1
- package/dist/_chunks/index-c8b8a2ee.mjs +0 -359
- package/dist/_chunks/index-c8b8a2ee.mjs.map +0 -1
- package/dist/_chunks/index-c97f5820.js +0 -1456
- package/dist/_chunks/index-c97f5820.js.map +0 -1
- package/dist/_chunks/index-cb6a72d2.mjs +0 -127
- package/dist/_chunks/index-cb6a72d2.mjs.map +0 -1
- package/dist/_chunks/index-cbc7c054.js +0 -266
- package/dist/_chunks/index-cbc7c054.js.map +0 -1
- package/dist/_chunks/index-ce5995cd.mjs +0 -132
- package/dist/_chunks/index-ce5995cd.mjs.map +0 -1
- package/dist/_chunks/index-d1152896.js +0 -294
- package/dist/_chunks/index-d1152896.js.map +0 -1
- package/dist/_chunks/index-d1dd825b.js +0 -365
- package/dist/_chunks/index-d1dd825b.js.map +0 -1
- package/dist/_chunks/index-d2d9df41.mjs +0 -270
- package/dist/_chunks/index-d2d9df41.mjs.map +0 -1
- package/dist/_chunks/index-d3e1fd86.js +0 -490
- package/dist/_chunks/index-d3e1fd86.js.map +0 -1
- package/dist/_chunks/index-d4517ac4.mjs +0 -582
- package/dist/_chunks/index-d4517ac4.mjs.map +0 -1
- package/dist/_chunks/index-d49fa655.js +0 -873
- package/dist/_chunks/index-d49fa655.js.map +0 -1
- package/dist/_chunks/index-d6694cab.mjs +0 -125
- package/dist/_chunks/index-d6694cab.mjs.map +0 -1
- package/dist/_chunks/index-e117c643.mjs +0 -55
- package/dist/_chunks/index-e117c643.mjs.map +0 -1
- package/dist/_chunks/index-e1b90981.mjs +0 -314
- package/dist/_chunks/index-e1b90981.mjs.map +0 -1
- package/dist/_chunks/index-e24df0bf.js +0 -403
- package/dist/_chunks/index-e24df0bf.js.map +0 -1
- package/dist/_chunks/index-e2d2f58e.mjs +0 -47
- package/dist/_chunks/index-e2d2f58e.mjs.map +0 -1
- package/dist/_chunks/index-e369d741.mjs +0 -383
- package/dist/_chunks/index-e369d741.mjs.map +0 -1
- package/dist/_chunks/index-e79b2b9e.mjs +0 -338
- package/dist/_chunks/index-e79b2b9e.mjs.map +0 -1
- package/dist/_chunks/index-ea18ff22.mjs +0 -51
- package/dist/_chunks/index-ea18ff22.mjs.map +0 -1
- package/dist/_chunks/index-eb67694f.mjs +0 -261
- package/dist/_chunks/index-eb67694f.mjs.map +0 -1
- package/dist/_chunks/index-ed3696ec.js +0 -272
- package/dist/_chunks/index-ed3696ec.js.map +0 -1
- package/dist/_chunks/index-ee1ea38b.js +0 -129
- package/dist/_chunks/index-ee1ea38b.js.map +0 -1
- package/dist/_chunks/index-efc967f5.js +0 -55
- package/dist/_chunks/index-efc967f5.js.map +0 -1
- package/dist/_chunks/index-fc700e52.js +0 -263
- package/dist/_chunks/index-fc700e52.js.map +0 -1
- package/dist/_chunks/index-fd4e5616.mjs +0 -412
- package/dist/_chunks/index-fd4e5616.mjs.map +0 -1
- package/dist/_chunks/index-ffd2f664.js +0 -1337
- package/dist/_chunks/index-ffd2f664.js.map +0 -1
- package/dist/_chunks/it-4006227c.mjs +0 -459
- package/dist/_chunks/it-4006227c.mjs.map +0 -1
- package/dist/_chunks/it-9c4295f1.js +0 -459
- package/dist/_chunks/it-9c4295f1.js.map +0 -1
- package/dist/_chunks/ja-db43ca3d.mjs +0 -633
- package/dist/_chunks/ja-db43ca3d.mjs.map +0 -1
- package/dist/_chunks/ja-eb74520f.js +0 -633
- package/dist/_chunks/ja-eb74520f.js.map +0 -1
- package/dist/_chunks/ko-18e71df4.js +0 -631
- package/dist/_chunks/ko-18e71df4.js.map +0 -1
- package/dist/_chunks/ko-a7826e25.mjs +0 -631
- package/dist/_chunks/ko-a7826e25.mjs.map +0 -1
- package/dist/_chunks/ml-90131768.mjs +0 -722
- package/dist/_chunks/ml-90131768.mjs.map +0 -1
- package/dist/_chunks/ml-c5199364.js +0 -722
- package/dist/_chunks/ml-c5199364.js.map +0 -1
- package/dist/_chunks/ms-bc514df6.js +0 -342
- package/dist/_chunks/ms-bc514df6.js.map +0 -1
- package/dist/_chunks/ms-f4f16a83.mjs +0 -342
- package/dist/_chunks/ms-f4f16a83.mjs.map +0 -1
- package/dist/_chunks/nl-887ce2c3.mjs +0 -828
- package/dist/_chunks/nl-887ce2c3.mjs.map +0 -1
- package/dist/_chunks/nl-f1aedbe2.js +0 -828
- package/dist/_chunks/nl-f1aedbe2.js.map +0 -1
- package/dist/_chunks/no-ec6c2927.js +0 -310
- package/dist/_chunks/no-ec6c2927.js.map +0 -1
- package/dist/_chunks/no-f0b02541.mjs +0 -310
- package/dist/_chunks/no-f0b02541.mjs.map +0 -1
- package/dist/_chunks/pl-9be86414.js +0 -721
- package/dist/_chunks/pl-9be86414.js.map +0 -1
- package/dist/_chunks/pl-9ccd35d9.mjs +0 -721
- package/dist/_chunks/pl-9ccd35d9.mjs.map +0 -1
- package/dist/_chunks/pt-4fcc08f1.js +0 -296
- package/dist/_chunks/pt-4fcc08f1.js.map +0 -1
- package/dist/_chunks/pt-8acb6ac1.mjs +0 -296
- package/dist/_chunks/pt-8acb6ac1.mjs.map +0 -1
- package/dist/_chunks/pt-BR-d43239e3.js +0 -794
- package/dist/_chunks/pt-BR-d43239e3.js.map +0 -1
- package/dist/_chunks/pt-BR-fd73cb13.mjs +0 -794
- package/dist/_chunks/pt-BR-fd73cb13.mjs.map +0 -1
- package/dist/_chunks/ru-9aad40c5.mjs +0 -993
- package/dist/_chunks/ru-9aad40c5.mjs.map +0 -1
- package/dist/_chunks/ru-c0293425.js +0 -993
- package/dist/_chunks/ru-c0293425.js.map +0 -1
- package/dist/_chunks/sa-6bf4c20e.mjs +0 -722
- package/dist/_chunks/sa-6bf4c20e.mjs.map +0 -1
- package/dist/_chunks/sa-8ffb7ca7.js +0 -722
- package/dist/_chunks/sa-8ffb7ca7.js.map +0 -1
- package/dist/_chunks/schema-260fec28.js +0 -514
- package/dist/_chunks/schema-260fec28.js.map +0 -1
- package/dist/_chunks/schema-6bd8bd85.mjs +0 -490
- package/dist/_chunks/schema-6bd8bd85.mjs.map +0 -1
- package/dist/_chunks/sk-58d31b17.mjs +0 -690
- package/dist/_chunks/sk-58d31b17.mjs.map +0 -1
- package/dist/_chunks/sk-a9308737.js +0 -690
- package/dist/_chunks/sk-a9308737.js.map +0 -1
- package/dist/_chunks/sv-0f5ffd1e.js +0 -827
- package/dist/_chunks/sv-0f5ffd1e.js.map +0 -1
- package/dist/_chunks/sv-d80ad633.mjs +0 -827
- package/dist/_chunks/sv-d80ad633.mjs.map +0 -1
- package/dist/_chunks/th-a53bbf7a.js +0 -430
- package/dist/_chunks/th-a53bbf7a.js.map +0 -1
- package/dist/_chunks/th-e72c6a22.mjs +0 -430
- package/dist/_chunks/th-e72c6a22.mjs.map +0 -1
- package/dist/_chunks/tr-b84a68b0.js +0 -785
- package/dist/_chunks/tr-b84a68b0.js.map +0 -1
- package/dist/_chunks/tr-e35ecfe8.mjs +0 -785
- package/dist/_chunks/tr-e35ecfe8.mjs.map +0 -1
- package/dist/_chunks/uk-de367ec1.mjs +0 -343
- package/dist/_chunks/uk-de367ec1.mjs.map +0 -1
- package/dist/_chunks/uk-e5226227.js +0 -343
- package/dist/_chunks/uk-e5226227.js.map +0 -1
- package/dist/_chunks/useAdminRolePermissions-603a2709.mjs +0 -2322
- package/dist/_chunks/useAdminRolePermissions-603a2709.mjs.map +0 -1
- package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js +0 -2337
- package/dist/_chunks/useAdminRolePermissions-cb1a3ee2.js.map +0 -1
- package/dist/_chunks/useAdminRoles-68d5d608.js +0 -62
- package/dist/_chunks/useAdminRoles-68d5d608.js.map +0 -1
- package/dist/_chunks/useAdminRoles-7ab5d521.mjs +0 -44
- package/dist/_chunks/useAdminRoles-7ab5d521.mjs.map +0 -1
- package/dist/_chunks/useAdminUsers-05d6b26a.js +0 -61
- package/dist/_chunks/useAdminUsers-05d6b26a.js.map +0 -1
- package/dist/_chunks/useAdminUsers-09f86a58.mjs +0 -43
- package/dist/_chunks/useAdminUsers-09f86a58.mjs.map +0 -1
- package/dist/_chunks/useContentTypes-53b449bb.mjs +0 -67
- package/dist/_chunks/useContentTypes-53b449bb.mjs.map +0 -1
- package/dist/_chunks/useContentTypes-7da293cc.js +0 -85
- package/dist/_chunks/useContentTypes-7da293cc.js.map +0 -1
- package/dist/_chunks/useDebounce-4712871e.js +0 -35
- package/dist/_chunks/useDebounce-4712871e.js.map +0 -1
- package/dist/_chunks/useDebounce-9364f340.mjs +0 -17
- package/dist/_chunks/useDebounce-9364f340.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs +0 -80
- package/dist/_chunks/useLicenseLimitNotification-1fd756fa.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js +0 -100
- package/dist/_chunks/useLicenseLimitNotification-8a4d7fc1.js.map +0 -1
- package/dist/_chunks/useLicenseLimits-13a102d3.mjs +0 -31
- package/dist/_chunks/useLicenseLimits-13a102d3.mjs.map +0 -1
- package/dist/_chunks/useLicenseLimits-81ef3cce.js +0 -49
- package/dist/_chunks/useLicenseLimits-81ef3cce.js.map +0 -1
- package/dist/_chunks/useReviewWorkflows-799e0305.js +0 -59
- package/dist/_chunks/useReviewWorkflows-799e0305.js.map +0 -1
- package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs +0 -41
- package/dist/_chunks/useReviewWorkflows-9e6b8986.mjs.map +0 -1
- package/dist/_chunks/validateWorkflow-5693ea2d.js +0 -1124
- package/dist/_chunks/validateWorkflow-5693ea2d.js.map +0 -1
- package/dist/_chunks/validateWorkflow-7a2b6ab8.mjs +0 -1101
- package/dist/_chunks/validateWorkflow-7a2b6ab8.mjs.map +0 -1
- package/dist/_chunks/vi-096bccbb.mjs +0 -298
- package/dist/_chunks/vi-096bccbb.mjs.map +0 -1
- package/dist/_chunks/vi-c5fabb75.js +0 -298
- package/dist/_chunks/vi-c5fabb75.js.map +0 -1
- package/dist/_chunks/zh-24f618cb.js +0 -836
- package/dist/_chunks/zh-24f618cb.js.map +0 -1
- package/dist/_chunks/zh-Hans-35d2c374.js +0 -957
- package/dist/_chunks/zh-Hans-35d2c374.js.map +0 -1
- package/dist/_chunks/zh-Hans-ccf4be4b.mjs +0 -957
- package/dist/_chunks/zh-Hans-ccf4be4b.mjs.map +0 -1
- package/dist/_chunks/zh-ba29b2e1.mjs +0 -836
- package/dist/_chunks/zh-ba29b2e1.mjs.map +0 -1
- package/dist/admin/index.js +0 -34
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs +0 -34
- package/dist/admin/index.mjs.map +0 -1
- package/dist/admin/src/App.d.ts +0 -6
- package/dist/admin/src/StrapiApp.d.ts +0 -140
- package/dist/admin/src/components/AuthenticatedApp.d.ts +0 -2
- package/dist/admin/src/components/ConfigurationProvider.d.ts +0 -11
- package/dist/admin/src/components/DefaultDocument.d.ts +0 -5
- package/dist/admin/src/components/DragLayer.d.ts +0 -10
- package/dist/admin/src/components/GuidedTour/Homepage.d.ts +0 -2
- package/dist/admin/src/components/GuidedTour/Modal.d.ts +0 -2
- package/dist/admin/src/components/GuidedTour/Ornaments.d.ts +0 -13
- package/dist/admin/src/components/GuidedTour/Provider.d.ts +0 -6
- package/dist/admin/src/components/GuidedTour/constants.d.ts +0 -165
- package/dist/admin/src/components/LanguageProvider.d.ts +0 -19
- package/dist/admin/src/components/LeftMenu.d.ts +0 -5
- package/dist/admin/src/components/NoJavascript.d.ts +0 -7
- package/dist/admin/src/components/NpsSurvey.d.ts +0 -17
- package/dist/admin/src/components/Onboarding.d.ts +0 -2
- package/dist/admin/src/components/PluginsInitializer.d.ts +0 -5
- package/dist/admin/src/components/PrivateRoute.d.ts +0 -8
- package/dist/admin/src/components/Providers.d.ts +0 -13
- package/dist/admin/src/components/RBACProvider.d.ts +0 -27
- package/dist/admin/src/components/Theme.d.ts +0 -6
- package/dist/admin/src/components/ThemeToggleProvider.d.ts +0 -12
- package/dist/admin/src/components/UnauthenticatedLogo.d.ts +0 -2
- package/dist/admin/src/constants.d.ts +0 -195
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksContent.d.ts +0 -5
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksEditor.d.ts +0 -34
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksInput.d.ts +0 -18
- package/dist/admin/src/content-manager/components/BlocksInput/BlocksToolbar.d.ts +0 -2
- package/dist/admin/src/content-manager/components/BlocksInput/hooks/useBlocksStore.d.ts +0 -32
- package/dist/admin/src/content-manager/components/BlocksInput/hooks/useModifiersStore.d.ts +0 -20
- package/dist/admin/src/content-manager/components/BlocksInput/plugins/withLinks.d.ts +0 -8
- package/dist/admin/src/content-manager/components/BlocksInput/plugins/withStrapiSchema.d.ts +0 -8
- package/dist/admin/src/content-manager/components/BlocksInput/tests/mock-schema.d.ts +0 -2
- package/dist/admin/src/content-manager/components/BlocksInput/utils/links.d.ts +0 -10
- package/dist/admin/src/content-manager/components/BlocksInput/utils/types.d.ts +0 -6
- package/dist/admin/src/contexts/admin.d.ts +0 -14
- package/dist/admin/src/contexts/apiTokenPermissions.d.ts +0 -36
- package/dist/admin/src/contexts/configuration.d.ts +0 -27
- package/dist/admin/src/contexts/themeToggle.d.ts +0 -22
- package/dist/admin/src/core/apis/Components.d.ts +0 -10
- package/dist/admin/src/core/apis/CustomFields.d.ts +0 -8
- package/dist/admin/src/core/apis/Fields.d.ts +0 -10
- package/dist/admin/src/core/apis/Middlewares.d.ts +0 -9
- package/dist/admin/src/core/apis/Plugin.d.ts +0 -19
- package/dist/admin/src/core/apis/Reducers.d.ts +0 -10
- package/dist/admin/src/core/store/configure.d.ts +0 -29
- package/dist/admin/src/core/store/hooks.d.ts +0 -37
- package/dist/admin/src/core/utils/basename.d.ts +0 -1
- package/dist/admin/src/core/utils/createHook.d.ts +0 -10
- package/dist/admin/src/hooks/__mocks__/useAdminUsers.d.ts +0 -2
- package/dist/admin/src/hooks/__mocks__/useContentTypes.d.ts +0 -2
- package/dist/admin/src/hooks/__mocks__/useSettingsMenu.d.ts +0 -2
- package/dist/admin/src/hooks/useAdminRoles.d.ts +0 -13
- package/dist/admin/src/hooks/useAdminUsers.d.ts +0 -19
- package/dist/admin/src/hooks/useContentTypes.d.ts +0 -7
- package/dist/admin/src/hooks/useDebounce.d.ts +0 -1
- package/dist/admin/src/hooks/useEnterprise.d.ts +0 -8
- package/dist/admin/src/hooks/useInjectReducer.d.ts +0 -10
- package/dist/admin/src/hooks/useLicenseLimitNotification.d.ts +0 -1
- package/dist/admin/src/hooks/useMenu.d.ts +0 -9
- package/dist/admin/src/hooks/useSettingsMenu.d.ts +0 -24
- package/dist/admin/src/index.d.ts +0 -3
- package/dist/admin/src/layouts/AppLayout.d.ts +0 -7
- package/dist/admin/src/layouts/UnauthenticatedLayout.d.ts +0 -11
- package/dist/admin/src/pages/Admin.d.ts +0 -7
- package/dist/admin/src/pages/Auth/AuthPage.d.ts +0 -6
- package/dist/admin/src/pages/Auth/components/FieldActionWrapper.d.ts +0 -3
- package/dist/admin/src/pages/Auth/components/ForgotPassword.d.ts +0 -3
- package/dist/admin/src/pages/Auth/components/ForgotPasswordSuccess.d.ts +0 -2
- package/dist/admin/src/pages/Auth/components/Login.d.ts +0 -8
- package/dist/admin/src/pages/Auth/components/Oops.d.ts +0 -2
- package/dist/admin/src/pages/Auth/components/Register.d.ts +0 -7
- package/dist/admin/src/pages/Auth/components/ResetPassword.d.ts +0 -3
- package/dist/admin/src/pages/Auth/constants.d.ts +0 -14
- package/dist/admin/src/pages/HomePage.d.ts +0 -3
- package/dist/admin/src/pages/InstalledPluginsPage.d.ts +0 -3
- package/dist/admin/src/pages/InternalErrorPage.d.ts +0 -7
- package/dist/admin/src/pages/Marketplace/MarketplacePage.d.ts +0 -19
- package/dist/admin/src/pages/Marketplace/components/NpmPackageCard.d.ts +0 -13
- package/dist/admin/src/pages/Marketplace/components/NpmPackagesFilters.d.ts +0 -13
- package/dist/admin/src/pages/Marketplace/components/NpmPackagesGrid.d.ts +0 -13
- package/dist/admin/src/pages/Marketplace/components/OfflineLayout.d.ts +0 -2
- package/dist/admin/src/pages/Marketplace/components/PageHeader.d.ts +0 -8
- package/dist/admin/src/pages/Marketplace/components/SortSelect.d.ts +0 -51
- package/dist/admin/src/pages/Marketplace/hooks/__mocks__/useNavigatorOnline.d.ts +0 -1
- package/dist/admin/src/pages/Marketplace/hooks/useMarketplaceData.d.ts +0 -92
- package/dist/admin/src/pages/Marketplace/hooks/useNavigatorOnline.d.ts +0 -5
- package/dist/admin/src/pages/NotFoundPage.d.ts +0 -1
- package/dist/admin/src/pages/ProfilePage.d.ts +0 -2
- package/dist/admin/src/pages/SettingsPage/hooks/useRegenerate.d.ts +0 -4
- package/dist/admin/src/pages/SettingsPage/pages/Roles/EditPage/hooks/usePermissionsDataManager.d.ts +0 -24
- package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/__mocks__/useAdminRolePermissions.d.ts +0 -2
- package/dist/admin/src/pages/SettingsPage/pages/Roles/hooks/useAdminRolePermissions.d.ts +0 -11
- package/dist/admin/src/pages/SettingsPage/utils/makeUniqueRoutes.d.ts +0 -6
- package/dist/admin/src/pages/UseCasePage.d.ts +0 -8
- package/dist/admin/src/reducer.d.ts +0 -21
- package/dist/admin/src/render.d.ts +0 -10
- package/dist/admin/src/selectors.d.ts +0 -21
- package/dist/admin/src/shared/components/InjectionZone.d.ts +0 -53
- package/dist/admin/src/shared/hooks/__mocks__/useInjectionZone.d.ts +0 -1
- package/dist/admin/src/shared/hooks/useInjectionZone.d.ts +0 -2
- package/dist/admin/src/translations/languageNativeNames.d.ts +0 -36
- package/dist/admin/src/types/permissions.d.ts +0 -17
- package/dist/admin/src/utils/createRoute.d.ts +0 -6
- package/dist/admin/src/utils/formatAPIErrors.d.ts +0 -6
- package/dist/admin/src/utils/getFullName.d.ts +0 -1
- package/dist/admin/src/utils/hashAdminUserEmail.d.ts +0 -6
- package/dist/cli.js +0 -48
- package/dist/cli.js.map +0 -1
- package/dist/cli.mjs +0 -48
- package/dist/cli.mjs.map +0 -1
- package/dist/ee/admin/src/constants.d.ts +0 -55
- package/dist/ee/admin/src/hooks/useLicenseLimitNotification.d.ts +0 -1
- package/dist/ee/admin/src/pages/AuthPage/components/Login.d.ts +0 -3
- package/dist/ee/admin/src/pages/AuthPage/components/Providers.d.ts +0 -2
- package/dist/ee/admin/src/pages/AuthPage/components/SSOProviders.d.ts +0 -8
- package/dist/ee/admin/src/pages/AuthPage/constants.d.ts +0 -3
- package/dist/ee/admin/src/pages/AuthResponse.d.ts +0 -2
- package/dist/ee/admin/src/pages/HomePage.d.ts +0 -1
- package/dist/shared/contracts/admin.d.ts +0 -23
- package/dist/shared/contracts/authentication.d.ts +0 -126
- package/dist/shared/contracts/providers.d.ts +0 -34
- package/dist/shared/contracts/roles.d.ts +0 -52
- package/dist/shared/contracts/shared.d.ts +0 -39
- package/dist/shared/contracts/user.d.ts +0 -40
- package/dist/shared/contracts/users.d.ts +0 -52
- package/dist/shared/schema.d.ts +0 -7
- package/ee/server/bootstrap.js +0 -41
- package/ee/server/config/admin-actions.js +0 -72
- package/ee/server/constants/default-stages.json +0 -18
- package/ee/server/constants/default-workflow.json +0 -3
- package/ee/server/constants/webhookEvents.js +0 -5
- package/ee/server/constants/workflows.js +0 -33
- package/ee/server/content-types/index.js +0 -9
- package/ee/server/content-types/workflow/index.js +0 -41
- package/ee/server/content-types/workflow-stage/index.js +0 -51
- package/ee/server/controllers/__tests__/stages.test.js +0 -174
- package/ee/server/controllers/admin.js +0 -50
- package/ee/server/controllers/audit-logs.js +0 -24
- package/ee/server/controllers/authentication/constants.js +0 -11
- package/ee/server/controllers/authentication/index.js +0 -11
- package/ee/server/controllers/authentication/middlewares.js +0 -117
- package/ee/server/controllers/authentication/utils.js +0 -23
- package/ee/server/controllers/authentication.js +0 -64
- package/ee/server/controllers/index.js +0 -12
- package/ee/server/controllers/role.js +0 -64
- package/ee/server/controllers/user.js +0 -110
- package/ee/server/controllers/workflows/assignees/index.js +0 -44
- package/ee/server/controllers/workflows/index.js +0 -188
- package/ee/server/controllers/workflows/stages/index.js +0 -189
- package/ee/server/destroy.js +0 -12
- package/ee/server/index.js +0 -11
- package/ee/server/middlewares/__tests__/review-workflows.test.js +0 -40
- package/ee/server/middlewares/review-workflows.js +0 -40
- package/ee/server/migrations/audit-logs-table.js +0 -45
- package/ee/server/migrations/review-workflows-content-types.js +0 -29
- package/ee/server/migrations/review-workflows-deleted-ct-in-workflows.js +0 -39
- package/ee/server/migrations/review-workflows-stage-attribute.js +0 -49
- package/ee/server/migrations/review-workflows-stages-color.js +0 -20
- package/ee/server/migrations/review-workflows-stages-roles.js +0 -68
- package/ee/server/migrations/review-workflows-workflow-name.js +0 -28
- package/ee/server/register.js +0 -40
- package/ee/server/routes/audit-logs.js +0 -43
- package/ee/server/routes/index.js +0 -8
- package/ee/server/routes/license-limit.js +0 -29
- package/ee/server/routes/review-workflows.js +0 -164
- package/ee/server/routes/sso.js +0 -69
- package/ee/server/routes/utils.js +0 -15
- package/ee/server/services/__tests__/assignees.test.js +0 -76
- package/ee/server/services/__tests__/audit-logs.test.js +0 -300
- package/ee/server/services/__tests__/passport.test.js +0 -95
- package/ee/server/services/__tests__/review-workflows-validation.test.js +0 -100
- package/ee/server/services/__tests__/review-workflows.test.js +0 -163
- package/ee/server/services/__tests__/sso.test.js +0 -117
- package/ee/server/services/__tests__/stages.test.js +0 -275
- package/ee/server/services/__tests__/workflows.test.js +0 -203
- package/ee/server/services/audit-logs.js +0 -236
- package/ee/server/services/auth.js +0 -75
- package/ee/server/services/index.js +0 -18
- package/ee/server/services/passport/provider-registry.js +0 -27
- package/ee/server/services/passport/sso.js +0 -37
- package/ee/server/services/passport.js +0 -46
- package/ee/server/services/review-workflows/__tests__/entity-service-decorator.test.js +0 -211
- package/ee/server/services/review-workflows/assignees.js +0 -54
- package/ee/server/services/review-workflows/entity-service-decorator.js +0 -101
- package/ee/server/services/review-workflows/metrics/__tests__/weekly-metrics.test.js +0 -65
- package/ee/server/services/review-workflows/metrics/index.js +0 -56
- package/ee/server/services/review-workflows/metrics/weekly-metrics.js +0 -76
- package/ee/server/services/review-workflows/review-workflows.js +0 -133
- package/ee/server/services/review-workflows/stage-permissions.js +0 -60
- package/ee/server/services/review-workflows/stages.js +0 -384
- package/ee/server/services/review-workflows/validation.js +0 -68
- package/ee/server/services/review-workflows/workflows/__tests__/content-types.test.js +0 -146
- package/ee/server/services/review-workflows/workflows/content-types.js +0 -89
- package/ee/server/services/review-workflows/workflows/index.js +0 -237
- package/ee/server/services/role.js +0 -24
- package/ee/server/services/seat-enforcement.js +0 -114
- package/ee/server/services/user.js +0 -234
- package/ee/server/utils/__tests__/persisted-tables.test.js +0 -38
- package/ee/server/utils/__tests__/sso-lock.test.js +0 -84
- package/ee/server/utils/index.js +0 -8
- package/ee/server/utils/persisted-tables.js +0 -139
- package/ee/server/utils/review-workflows.js +0 -39
- package/ee/server/utils/sso-lock.js +0 -42
- package/ee/server/validation/audit-logs.js +0 -18
- package/ee/server/validation/authentication.js +0 -36
- package/ee/server/validation/review-workflows.js +0 -92
- package/ee/server/validation/role.js +0 -68
- package/ee/server/validation/user.js +0 -27
- package/ee/strapi-server.js +0 -3
- package/server/bootstrap.js +0 -101
- package/server/config/admin-actions.js +0 -216
- package/server/config/admin-conditions.js +0 -26
- package/server/config/email-templates/forgot-password.js +0 -25
- package/server/config/index.js +0 -9
- package/server/config/settings.js +0 -9
- package/server/content-types/Permission.js +0 -64
- package/server/content-types/Role.js +0 -59
- package/server/content-types/User.js +0 -112
- package/server/content-types/api-token-permission.js +0 -36
- package/server/content-types/api-token.js +0 -76
- package/server/content-types/index.js +0 -11
- package/server/content-types/transfer-token-permission.js +0 -36
- package/server/content-types/transfer-token.js +0 -66
- package/server/controllers/__tests__/admin.test.js +0 -106
- package/server/controllers/__tests__/api-token.test.js +0 -496
- package/server/controllers/__tests__/content-api.test.js +0 -173
- package/server/controllers/__tests__/permission.test.js +0 -200
- package/server/controllers/__tests__/role.test.js +0 -201
- package/server/controllers/__tests__/transfer/token.test.js +0 -520
- package/server/controllers/__tests__/user.test.js +0 -326
- package/server/controllers/admin.js +0 -151
- package/server/controllers/api-token.js +0 -135
- package/server/controllers/authenticated-user.js +0 -52
- package/server/controllers/authentication.js +0 -172
- package/server/controllers/content-api.js +0 -15
- package/server/controllers/formatters/conditions.js +0 -12
- package/server/controllers/formatters/format-actions-by-sections.js +0 -40
- package/server/controllers/formatters/index.js +0 -9
- package/server/controllers/index.js +0 -14
- package/server/controllers/permission.js +0 -45
- package/server/controllers/role.js +0 -198
- package/server/controllers/transfer/index.js +0 -13
- package/server/controllers/transfer/runner.js +0 -28
- package/server/controllers/transfer/token.js +0 -131
- package/server/controllers/user.js +0 -141
- package/server/controllers/webhooks.js +0 -132
- package/server/destroy.js +0 -10
- package/server/domain/action/__tests__/action-domain.test.js +0 -230
- package/server/domain/action/__tests__/action-provider.test.js +0 -376
- package/server/domain/action/index.js +0 -142
- package/server/domain/action/provider.js +0 -83
- package/server/domain/condition/__tests__/condition-domain.test.js +0 -122
- package/server/domain/condition/__tests__/condition-provider.test.js +0 -156
- package/server/domain/condition/index.js +0 -92
- package/server/domain/condition/provider.js +0 -42
- package/server/domain/permission/__tests__/permission-domain.test.js +0 -285
- package/server/domain/permission/index.js +0 -156
- package/server/domain/user.js +0 -28
- package/server/index.js +0 -26
- package/server/middlewares/data-transfer.js +0 -29
- package/server/middlewares/index.js +0 -8
- package/server/middlewares/rateLimit.js +0 -47
- package/server/policies/hasPermissions.js +0 -38
- package/server/policies/index.js +0 -7
- package/server/policies/isAuthenticatedAdmin.js +0 -5
- package/server/policies/isTelemetryEnabled.js +0 -16
- package/server/register.js +0 -19
- package/server/routes/admin.js +0 -71
- package/server/routes/api-tokens.js +0 -70
- package/server/routes/authentication.js +0 -57
- package/server/routes/content-api.js +0 -20
- package/server/routes/index.js +0 -28
- package/server/routes/permissions.js +0 -20
- package/server/routes/roles.js +0 -107
- package/server/routes/serve-admin-panel.js +0 -71
- package/server/routes/transfer.js +0 -102
- package/server/routes/users.js +0 -88
- package/server/routes/webhooks.js +0 -81
- package/server/services/__tests__/action.test.js +0 -98
- package/server/services/__tests__/api-token.test.js +0 -980
- package/server/services/__tests__/auth.test.js +0 -319
- package/server/services/__tests__/content-type.test.js +0 -405
- package/server/services/__tests__/metrics.test.js +0 -65
- package/server/services/__tests__/passport.test.js +0 -90
- package/server/services/__tests__/permission.test.js +0 -177
- package/server/services/__tests__/permissions-manager-sanitize.test.js +0 -117
- package/server/services/__tests__/permissions-manager-validate.test.js +0 -119
- package/server/services/__tests__/permissions-manager.test.js +0 -318
- package/server/services/__tests__/permissions.section-builder.section.test.js +0 -136
- package/server/services/__tests__/project-settings.test.js +0 -397
- package/server/services/__tests__/role.test.js +0 -970
- package/server/services/__tests__/token.test.js +0 -217
- package/server/services/__tests__/transfer/token.test.js +0 -878
- package/server/services/__tests__/user.test.js +0 -786
- package/server/services/action.js +0 -35
- package/server/services/api-token.js +0 -453
- package/server/services/auth.js +0 -117
- package/server/services/condition.js +0 -14
- package/server/services/constants.js +0 -37
- package/server/services/content-type.js +0 -208
- package/server/services/index.js +0 -18
- package/server/services/metrics.js +0 -44
- package/server/services/passport/local-strategy.js +0 -28
- package/server/services/passport.js +0 -45
- package/server/services/permission/engine.js +0 -85
- package/server/services/permission/permissions-manager/index.js +0 -53
- package/server/services/permission/permissions-manager/query-builders.js +0 -72
- package/server/services/permission/permissions-manager/sanitize.js +0 -286
- package/server/services/permission/permissions-manager/validate.js +0 -218
- package/server/services/permission/queries.js +0 -190
- package/server/services/permission/sections-builder/builder.js +0 -84
- package/server/services/permission/sections-builder/handlers.js +0 -156
- package/server/services/permission/sections-builder/index.js +0 -50
- package/server/services/permission/sections-builder/section.js +0 -71
- package/server/services/permission/sections-builder/utils.js +0 -26
- package/server/services/permission.js +0 -33
- package/server/services/project-settings.js +0 -174
- package/server/services/role.js +0 -471
- package/server/services/token.js +0 -70
- package/server/services/transfer/index.js +0 -7
- package/server/services/transfer/permission.js +0 -22
- package/server/services/transfer/token.js +0 -449
- package/server/services/transfer/utils.js +0 -38
- package/server/services/user.js +0 -363
- package/server/strategies/__tests__/admin.test.js +0 -118
- package/server/strategies/__tests__/api-token.test.js +0 -364
- package/server/strategies/admin.js +0 -52
- package/server/strategies/api-token.js +0 -140
- package/server/strategies/data-transfer.js +0 -113
- package/server/strategies/index.js +0 -26
- package/server/utils/index.d.ts +0 -25
- package/server/utils/index.js +0 -9
- package/server/validation/__tests__/common-functions.test.js +0 -54
- package/server/validation/action-provider.js +0 -67
- package/server/validation/api-tokens.js +0 -32
- package/server/validation/authentication/forgot-password.js +0 -14
- package/server/validation/authentication/index.js +0 -19
- package/server/validation/authentication/register.js +0 -45
- package/server/validation/authentication/renew-token.js +0 -7
- package/server/validation/authentication/reset-password.js +0 -15
- package/server/validation/common-functions/check-fields-are-correctly-nested.js +0 -28
- package/server/validation/common-functions/check-fields-dont-have-duplicates.js +0 -17
- package/server/validation/common-functions/index.js +0 -9
- package/server/validation/common-validators.js +0 -209
- package/server/validation/permission.js +0 -53
- package/server/validation/policies/hasPermissions.js +0 -27
- package/server/validation/project-settings.js +0 -48
- package/server/validation/role.js +0 -59
- package/server/validation/transfer/index.js +0 -5
- package/server/validation/transfer/token.js +0 -42
- package/server/validation/user.js +0 -65
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const { mapAsync } = require('@strapi/utils');
|
|
4
|
-
const { difference, merge } = require('lodash/fp');
|
|
5
|
-
const { getService } = require('../../../utils');
|
|
6
|
-
const { WORKFLOW_MODEL_UID } = require('../../../constants/workflows');
|
|
7
|
-
|
|
8
|
-
module.exports = ({ strapi }) => {
|
|
9
|
-
const contentManagerContentTypeService = strapi
|
|
10
|
-
.plugin('content-manager')
|
|
11
|
-
.service('content-types');
|
|
12
|
-
const stagesService = getService('stages', { strapi });
|
|
13
|
-
|
|
14
|
-
const updateContentTypeConfig = async (uid, reviewWorkflowOption) => {
|
|
15
|
-
// Merge options in the configuration as the configuration service use a destructuration merge which doesn't include nested objects
|
|
16
|
-
const modelConfig = await contentManagerContentTypeService.findConfiguration(uid);
|
|
17
|
-
|
|
18
|
-
await contentManagerContentTypeService.updateConfiguration(
|
|
19
|
-
{ uid },
|
|
20
|
-
{ options: merge(modelConfig.options, { reviewWorkflows: reviewWorkflowOption }) }
|
|
21
|
-
);
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
/**
|
|
26
|
-
* Migrates entities stages. Used when a content type is assigned to a workflow.
|
|
27
|
-
* @param {*} options
|
|
28
|
-
* @param {Array<string>} options.srcContentTypes - The content types assigned to the previous workflow
|
|
29
|
-
* @param {Array<string>} options.destContentTypes - The content types assigned to the new workflow
|
|
30
|
-
* @param {Workflow.Stage} options.stageId - The new stage to assign the entities to
|
|
31
|
-
*/
|
|
32
|
-
async migrate({ srcContentTypes = [], destContentTypes, stageId }) {
|
|
33
|
-
const workflowsService = getService('workflows', { strapi });
|
|
34
|
-
const { created, deleted } = diffContentTypes(srcContentTypes, destContentTypes);
|
|
35
|
-
|
|
36
|
-
await mapAsync(
|
|
37
|
-
created,
|
|
38
|
-
async (uid) => {
|
|
39
|
-
// Content Types should only be assigned to one workflow
|
|
40
|
-
// However, edge cases can happen, and this handles them
|
|
41
|
-
const srcWorkflows = await workflowsService._getAssignedWorkflows(uid, {});
|
|
42
|
-
|
|
43
|
-
if (srcWorkflows.length) {
|
|
44
|
-
// Updates all existing entities stages links to the new stage
|
|
45
|
-
await stagesService.updateEntitiesStage(uid, { toStageId: stageId });
|
|
46
|
-
// Transfer content types from the previous workflow(s)
|
|
47
|
-
await mapAsync(srcWorkflows, (srcWorkflow) =>
|
|
48
|
-
this.transferContentTypes(srcWorkflow, uid)
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
await updateContentTypeConfig(uid, true);
|
|
52
|
-
|
|
53
|
-
// Create new stages links to the new stage
|
|
54
|
-
return stagesService.updateEntitiesStage(uid, {
|
|
55
|
-
fromStageId: null,
|
|
56
|
-
toStageId: stageId,
|
|
57
|
-
});
|
|
58
|
-
},
|
|
59
|
-
// transferContentTypes can cause race conditions if called in parallel when updating the same workflow
|
|
60
|
-
{ concurrency: 1 }
|
|
61
|
-
);
|
|
62
|
-
|
|
63
|
-
await mapAsync(deleted, async (uid) => {
|
|
64
|
-
await updateContentTypeConfig(uid, false);
|
|
65
|
-
await stagesService.deleteAllEntitiesStage(uid, {});
|
|
66
|
-
});
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
/**
|
|
70
|
-
* Filters the content types assigned to a workflow
|
|
71
|
-
* @param {Workflow} srcWorkflow - The workflow to transfer from
|
|
72
|
-
* @param {string} uid - The content type uid
|
|
73
|
-
*/
|
|
74
|
-
async transferContentTypes(srcWorkflow, uid) {
|
|
75
|
-
// Update assignedContentTypes of the previous workflow
|
|
76
|
-
await strapi.entityService.update(WORKFLOW_MODEL_UID, srcWorkflow.id, {
|
|
77
|
-
data: {
|
|
78
|
-
contentTypes: srcWorkflow.contentTypes.filter((contentType) => contentType !== uid),
|
|
79
|
-
},
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
const diffContentTypes = (srcContentTypes, destContentTypes) => {
|
|
86
|
-
const created = difference(destContentTypes, srcContentTypes);
|
|
87
|
-
const deleted = difference(srcContentTypes, destContentTypes);
|
|
88
|
-
return { created, deleted };
|
|
89
|
-
};
|
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const { set, isString, map, get } = require('lodash/fp');
|
|
4
|
-
const { ApplicationError } = require('@strapi/utils').errors;
|
|
5
|
-
const { WORKFLOW_MODEL_UID, WORKFLOW_POPULATE } = require('../../../constants/workflows');
|
|
6
|
-
const { getService } = require('../../../utils');
|
|
7
|
-
const { getWorkflowContentTypeFilter } = require('../../../utils/review-workflows');
|
|
8
|
-
const workflowsContentTypesFactory = require('./content-types');
|
|
9
|
-
|
|
10
|
-
const processFilters = ({ strapi }, filters = {}) => {
|
|
11
|
-
const processedFilters = { ...filters };
|
|
12
|
-
|
|
13
|
-
if (isString(filters.contentTypes)) {
|
|
14
|
-
processedFilters.contentTypes = getWorkflowContentTypeFilter({ strapi }, filters.contentTypes);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
return processedFilters;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
// TODO: How can we improve this? Maybe using traversePopulate?
|
|
21
|
-
const processPopulate = (populate) => {
|
|
22
|
-
// If it does not exist or it's not an object (like an array) return the default populate
|
|
23
|
-
if (!populate) {
|
|
24
|
-
return populate;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return WORKFLOW_POPULATE;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
module.exports = ({ strapi }) => {
|
|
31
|
-
const workflowsContentTypes = workflowsContentTypesFactory({ strapi });
|
|
32
|
-
const workflowsValidationService = getService('review-workflows-validation', { strapi });
|
|
33
|
-
const metrics = getService('review-workflows-metrics', { strapi });
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
/**
|
|
37
|
-
* Returns all the workflows matching the user-defined filters.
|
|
38
|
-
* @param {object} opts - Options for the query.
|
|
39
|
-
* @param {object} opts.filters - Filters object.
|
|
40
|
-
* @returns {Promise<object[]>} - List of workflows that match the user's filters.
|
|
41
|
-
*/
|
|
42
|
-
async find(opts = {}) {
|
|
43
|
-
const filters = processFilters({ strapi }, opts.filters);
|
|
44
|
-
const populate = processPopulate(opts.populate);
|
|
45
|
-
|
|
46
|
-
return strapi.entityService.findMany(WORKFLOW_MODEL_UID, { ...opts, filters, populate });
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Returns the workflow with the specified ID.
|
|
51
|
-
* @param {string} id - ID of the requested workflow.
|
|
52
|
-
* @param {object} opts - Options for the query.
|
|
53
|
-
* @returns {Promise<object>} - Workflow object matching the requested ID.
|
|
54
|
-
*/
|
|
55
|
-
findById(id, opts) {
|
|
56
|
-
const populate = processPopulate(opts.populate);
|
|
57
|
-
return strapi.entityService.findOne(WORKFLOW_MODEL_UID, id, { ...opts, populate });
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* Creates a new workflow.
|
|
62
|
-
* @param {object} opts - Options for creating the new workflow.
|
|
63
|
-
* @returns {Promise<object>} - Workflow object that was just created.
|
|
64
|
-
* @throws {ValidationError} - If the workflow has no stages.
|
|
65
|
-
*/
|
|
66
|
-
async create(opts) {
|
|
67
|
-
let createOpts = { ...opts, populate: WORKFLOW_POPULATE };
|
|
68
|
-
|
|
69
|
-
workflowsValidationService.validateWorkflowStages(opts.data.stages);
|
|
70
|
-
await workflowsValidationService.validateWorkflowCount(1);
|
|
71
|
-
|
|
72
|
-
return strapi.db.transaction(async () => {
|
|
73
|
-
// Create stages
|
|
74
|
-
const stages = await getService('stages', { strapi }).createMany(opts.data.stages);
|
|
75
|
-
const mapIds = map(get('id'));
|
|
76
|
-
|
|
77
|
-
createOpts = set('data.stages', mapIds(stages), createOpts);
|
|
78
|
-
|
|
79
|
-
// Update (un)assigned Content Types
|
|
80
|
-
if (opts.data.contentTypes) {
|
|
81
|
-
await workflowsContentTypes.migrate({
|
|
82
|
-
destContentTypes: opts.data.contentTypes,
|
|
83
|
-
stageId: stages[0].id,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
metrics.sendDidCreateWorkflow();
|
|
88
|
-
|
|
89
|
-
// Create Workflow
|
|
90
|
-
return strapi.entityService.create(WORKFLOW_MODEL_UID, createOpts);
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
/**
|
|
95
|
-
* Updates an existing workflow.
|
|
96
|
-
* @param {object} workflow - The existing workflow to update.
|
|
97
|
-
* @param {object} opts - Options for updating the workflow.
|
|
98
|
-
* @returns {Promise<object>} - Workflow object that was just updated.
|
|
99
|
-
* @throws {ApplicationError} - If the supplied stage ID does not belong to the workflow.
|
|
100
|
-
*/
|
|
101
|
-
async update(workflow, opts) {
|
|
102
|
-
const stageService = getService('stages', { strapi });
|
|
103
|
-
let updateOpts = { ...opts, populate: { ...WORKFLOW_POPULATE } };
|
|
104
|
-
let updatedStageIds;
|
|
105
|
-
|
|
106
|
-
await workflowsValidationService.validateWorkflowCount();
|
|
107
|
-
|
|
108
|
-
return strapi.db.transaction(async () => {
|
|
109
|
-
// Update stages
|
|
110
|
-
if (opts.data.stages) {
|
|
111
|
-
workflowsValidationService.validateWorkflowStages(opts.data.stages);
|
|
112
|
-
opts.data.stages.forEach((stage) =>
|
|
113
|
-
this.assertStageBelongsToWorkflow(stage.id, workflow)
|
|
114
|
-
);
|
|
115
|
-
|
|
116
|
-
updatedStageIds = await stageService
|
|
117
|
-
.replaceStages(workflow.stages, opts.data.stages, workflow.contentTypes)
|
|
118
|
-
.then((stages) => stages.map((stage) => stage.id));
|
|
119
|
-
|
|
120
|
-
updateOpts = set('data.stages', updatedStageIds, updateOpts);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// Update (un)assigned Content Types
|
|
124
|
-
if (opts.data.contentTypes) {
|
|
125
|
-
await workflowsContentTypes.migrate({
|
|
126
|
-
srcContentTypes: workflow.contentTypes,
|
|
127
|
-
destContentTypes: opts.data.contentTypes,
|
|
128
|
-
stageId: updatedStageIds ? updatedStageIds[0] : workflow.stages[0].id,
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
metrics.sendDidEditWorkflow();
|
|
133
|
-
|
|
134
|
-
// Update Workflow
|
|
135
|
-
return strapi.entityService.update(WORKFLOW_MODEL_UID, workflow.id, updateOpts);
|
|
136
|
-
});
|
|
137
|
-
},
|
|
138
|
-
|
|
139
|
-
/**
|
|
140
|
-
* Deletes an existing workflow.
|
|
141
|
-
* Also deletes all the workflow stages and migrate all assigned the content types.
|
|
142
|
-
* @param {*} workflow
|
|
143
|
-
* @param {*} opts
|
|
144
|
-
* @returns
|
|
145
|
-
*/
|
|
146
|
-
async delete(workflow, opts) {
|
|
147
|
-
const stageService = getService('stages', { strapi });
|
|
148
|
-
|
|
149
|
-
const workflowCount = await this.count();
|
|
150
|
-
|
|
151
|
-
if (workflowCount <= 1) {
|
|
152
|
-
throw new ApplicationError('Can not delete the last workflow');
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return strapi.db.transaction(async () => {
|
|
156
|
-
// Delete stages
|
|
157
|
-
await stageService.deleteMany(workflow.stages);
|
|
158
|
-
|
|
159
|
-
// Unassign all content types, this will migrate the content types to null
|
|
160
|
-
await workflowsContentTypes.migrate({
|
|
161
|
-
srcContentTypes: workflow.contentTypes,
|
|
162
|
-
destContentTypes: [],
|
|
163
|
-
});
|
|
164
|
-
|
|
165
|
-
// Delete Workflow
|
|
166
|
-
return strapi.entityService.delete(WORKFLOW_MODEL_UID, workflow.id, opts);
|
|
167
|
-
});
|
|
168
|
-
},
|
|
169
|
-
/**
|
|
170
|
-
* Returns the total count of workflows.
|
|
171
|
-
* @returns {Promise<number>} - Total count of workflows.
|
|
172
|
-
*/
|
|
173
|
-
count() {
|
|
174
|
-
return strapi.entityService.count(WORKFLOW_MODEL_UID);
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* Finds the assigned workflow for a given content type ID.
|
|
179
|
-
* @param {string} uid - Content type ID to find the assigned workflow for.
|
|
180
|
-
* @param {object} opts - Options for the query.
|
|
181
|
-
* @returns {Promise<object|null>} - Assigned workflow object if found, or null.
|
|
182
|
-
*/
|
|
183
|
-
async getAssignedWorkflow(uid, opts = {}) {
|
|
184
|
-
const workflows = await this._getAssignedWorkflows(uid, opts);
|
|
185
|
-
return workflows.length > 0 ? workflows[0] : null;
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* Finds all the assigned workflows for a given content type ID.
|
|
190
|
-
* Normally, there should only be one workflow assigned to a content type.
|
|
191
|
-
* However, edge cases can occur where a content type is assigned to multiple workflows.
|
|
192
|
-
* @param {string} uid - Content type ID to find the assigned workflows for.
|
|
193
|
-
* @param {object} opts - Options for the query.
|
|
194
|
-
* @returns {Promise<object[]>} - List of assigned workflow objects.
|
|
195
|
-
*/
|
|
196
|
-
async _getAssignedWorkflows(uid, opts = {}) {
|
|
197
|
-
return this.find({
|
|
198
|
-
...opts,
|
|
199
|
-
filters: { contentTypes: getWorkflowContentTypeFilter({ strapi }, uid) },
|
|
200
|
-
});
|
|
201
|
-
},
|
|
202
|
-
|
|
203
|
-
/**
|
|
204
|
-
* Asserts that a content type has an assigned workflow.
|
|
205
|
-
* @param {string} uid - Content type ID to verify the assignment of.
|
|
206
|
-
* @returns {Promise<object>} - Workflow object associated with the content type ID.
|
|
207
|
-
* @throws {ApplicationError} - If no assigned workflow is found for the content type ID.
|
|
208
|
-
*/
|
|
209
|
-
async assertContentTypeBelongsToWorkflow(uid) {
|
|
210
|
-
const workflow = await this.getAssignedWorkflow(uid, {
|
|
211
|
-
populate: 'stages',
|
|
212
|
-
});
|
|
213
|
-
if (!workflow) {
|
|
214
|
-
throw new ApplicationError(`Review workflows is not activated on Content Type ${uid}.`);
|
|
215
|
-
}
|
|
216
|
-
return workflow;
|
|
217
|
-
},
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* Asserts that a stage belongs to a given workflow.
|
|
221
|
-
* @param {string} stageId - ID of stage to check.
|
|
222
|
-
* @param {object} workflow - Workflow object to check against.
|
|
223
|
-
* @returns
|
|
224
|
-
* @throws {ApplicationError} - If the stage does not belong to the specified workflow.
|
|
225
|
-
*/
|
|
226
|
-
assertStageBelongsToWorkflow(stageId, workflow) {
|
|
227
|
-
if (!stageId) {
|
|
228
|
-
return;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
const belongs = workflow.stages.some((stage) => stage.id === stageId);
|
|
232
|
-
if (!belongs) {
|
|
233
|
-
throw new ApplicationError(`Stage does not belong to workflow "${workflow.name}"`);
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const { toString } = require('lodash/fp');
|
|
4
|
-
const { ApplicationError } = require('@strapi/utils').errors;
|
|
5
|
-
|
|
6
|
-
const ssoCheckRolesIdForDeletion = async (ids) => {
|
|
7
|
-
const adminStore = await strapi.store({ type: 'core', name: 'admin' });
|
|
8
|
-
|
|
9
|
-
const {
|
|
10
|
-
providers: { defaultRole },
|
|
11
|
-
} = await adminStore.get({ key: 'auth' });
|
|
12
|
-
|
|
13
|
-
for (const roleId of ids) {
|
|
14
|
-
if (defaultRole && toString(defaultRole) === toString(roleId)) {
|
|
15
|
-
throw new ApplicationError(
|
|
16
|
-
'This role is used as the default SSO role. Make sure to change this configuration before deleting the role'
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
module.exports = {
|
|
23
|
-
ssoCheckRolesIdForDeletion,
|
|
24
|
-
};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line node/no-extraneous-require
|
|
4
|
-
const ee = require('@strapi/strapi/dist/utils/ee');
|
|
5
|
-
const { take, drop, map, prop, pick, reverse, isNil } = require('lodash/fp');
|
|
6
|
-
const { getService } = require('../../../server/utils');
|
|
7
|
-
const { SUPER_ADMIN_CODE } = require('../../../server/services/constants');
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Keeps the list of users disabled by the seat enforcement service
|
|
11
|
-
*/
|
|
12
|
-
const getDisabledUserList = async () => {
|
|
13
|
-
return strapi.store.get({ type: 'ee', key: 'disabled_users' });
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const enableMaximumUserCount = async (numberOfUsersToEnable) => {
|
|
17
|
-
const disabledUsers = await getDisabledUserList();
|
|
18
|
-
const orderedDisabledUsers = reverse(disabledUsers);
|
|
19
|
-
|
|
20
|
-
const usersToEnable = take(numberOfUsersToEnable, orderedDisabledUsers);
|
|
21
|
-
|
|
22
|
-
await strapi.db.query('admin::user').updateMany({
|
|
23
|
-
where: { id: map(prop('id'), usersToEnable) },
|
|
24
|
-
data: { isActive: true },
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
const remainingDisabledUsers = drop(numberOfUsersToEnable, orderedDisabledUsers);
|
|
28
|
-
|
|
29
|
-
await strapi.store.set({
|
|
30
|
-
type: 'ee',
|
|
31
|
-
key: 'disabled_users',
|
|
32
|
-
value: remainingDisabledUsers,
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
const disableUsersAboveLicenseLimit = async (numberOfUsersToDisable) => {
|
|
37
|
-
const currentlyDisabledUsers = (await getDisabledUserList()) ?? [];
|
|
38
|
-
|
|
39
|
-
const usersToDisable = [];
|
|
40
|
-
const nonSuperAdminUsersToDisable = await strapi.db.query('admin::user').findMany({
|
|
41
|
-
where: {
|
|
42
|
-
isActive: true,
|
|
43
|
-
roles: {
|
|
44
|
-
code: { $ne: SUPER_ADMIN_CODE },
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
orderBy: { createdAt: 'DESC' },
|
|
48
|
-
limit: numberOfUsersToDisable,
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
usersToDisable.push(...nonSuperAdminUsersToDisable);
|
|
52
|
-
|
|
53
|
-
if (nonSuperAdminUsersToDisable.length < numberOfUsersToDisable) {
|
|
54
|
-
const superAdminUsersToDisable = await strapi.db.query('admin::user').findMany({
|
|
55
|
-
where: {
|
|
56
|
-
isActive: true,
|
|
57
|
-
roles: { code: SUPER_ADMIN_CODE },
|
|
58
|
-
},
|
|
59
|
-
orderBy: { createdAt: 'DESC' },
|
|
60
|
-
limit: numberOfUsersToDisable - nonSuperAdminUsersToDisable.length,
|
|
61
|
-
});
|
|
62
|
-
|
|
63
|
-
usersToDisable.push(...superAdminUsersToDisable);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
await strapi.db.query('admin::user').updateMany({
|
|
67
|
-
where: { id: map(prop('id'), usersToDisable) },
|
|
68
|
-
data: { isActive: false },
|
|
69
|
-
});
|
|
70
|
-
|
|
71
|
-
await strapi.store.set({
|
|
72
|
-
type: 'ee',
|
|
73
|
-
key: 'disabled_users',
|
|
74
|
-
value: currentlyDisabledUsers.concat(map(pick(['id', 'isActive']), usersToDisable)),
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const syncDisabledUserRecords = async () => {
|
|
79
|
-
const disabledUsers = await strapi.store.get({ type: 'ee', key: 'disabled_users' });
|
|
80
|
-
|
|
81
|
-
if (!disabledUsers) {
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
await strapi.db.query('admin::user').updateMany({
|
|
86
|
-
where: { id: map(prop('id'), disabledUsers) },
|
|
87
|
-
data: { isActive: false },
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const seatEnforcementWorkflow = async () => {
|
|
92
|
-
const adminSeats = ee.seats;
|
|
93
|
-
if (isNil(adminSeats)) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// TODO: we need to make sure an admin can decide to disable specific user and reactivate others
|
|
98
|
-
await syncDisabledUserRecords();
|
|
99
|
-
|
|
100
|
-
const currentActiveUserCount = await getService('user').getCurrentActiveUserCount();
|
|
101
|
-
|
|
102
|
-
const adminSeatsLeft = adminSeats - currentActiveUserCount;
|
|
103
|
-
|
|
104
|
-
if (adminSeatsLeft > 0) {
|
|
105
|
-
await enableMaximumUserCount(adminSeatsLeft);
|
|
106
|
-
} else if (adminSeatsLeft < 0) {
|
|
107
|
-
await disableUsersAboveLicenseLimit(-adminSeatsLeft);
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
module.exports = {
|
|
112
|
-
seatEnforcementWorkflow,
|
|
113
|
-
getDisabledUserList,
|
|
114
|
-
};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const _ = require('lodash');
|
|
4
|
-
const { pipe, map, castArray, toNumber } = require('lodash/fp');
|
|
5
|
-
const { stringIncludes } = require('@strapi/utils');
|
|
6
|
-
const { ValidationError } = require('@strapi/utils').errors;
|
|
7
|
-
const { hasSuperAdminRole } = require('../../../server/domain/user');
|
|
8
|
-
const { getService } = require('../../../server/utils');
|
|
9
|
-
const { SUPER_ADMIN_CODE } = require('../../../server/services/constants');
|
|
10
|
-
|
|
11
|
-
/** Checks if ee disabled users list needs to be updated
|
|
12
|
-
* @param {string} id
|
|
13
|
-
* @param {object} input
|
|
14
|
-
*/
|
|
15
|
-
const updateEEDisabledUsersList = async (id, input) => {
|
|
16
|
-
const disabledUsers = await getService('seat-enforcement').getDisabledUserList();
|
|
17
|
-
|
|
18
|
-
if (!disabledUsers) {
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const user = disabledUsers.find((user) => user.id === Number(id));
|
|
23
|
-
if (!user) {
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
if (user.isActive !== input.isActive) {
|
|
28
|
-
const newDisabledUsersList = disabledUsers.filter((user) => user.id !== Number(id));
|
|
29
|
-
await strapi.store.set({
|
|
30
|
-
type: 'ee',
|
|
31
|
-
key: 'disabled_users',
|
|
32
|
-
value: newDisabledUsersList,
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const castNumberArray = pipe(castArray, map(toNumber));
|
|
38
|
-
|
|
39
|
-
const removeFromEEDisabledUsersList = async (ids) => {
|
|
40
|
-
let idsToCheck;
|
|
41
|
-
if (typeof ids === 'object') {
|
|
42
|
-
idsToCheck = castNumberArray(ids);
|
|
43
|
-
} else {
|
|
44
|
-
idsToCheck = [Number(ids)];
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const disabledUsers = await getService('seat-enforcement').getDisabledUserList();
|
|
48
|
-
|
|
49
|
-
if (!disabledUsers) {
|
|
50
|
-
return;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
const newDisabledUsersList = disabledUsers.filter((user) => !idsToCheck.includes(user.id));
|
|
54
|
-
await strapi.store.set({
|
|
55
|
-
type: 'ee',
|
|
56
|
-
key: 'disabled_users',
|
|
57
|
-
value: newDisabledUsersList,
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Update a user in database
|
|
63
|
-
* @param id query params to find the user to update
|
|
64
|
-
* @param attributes A partial user object
|
|
65
|
-
* @returns {Promise<user>}
|
|
66
|
-
*/
|
|
67
|
-
const updateById = async (id, attributes) => {
|
|
68
|
-
// Check at least one super admin remains
|
|
69
|
-
if (_.has(attributes, 'roles')) {
|
|
70
|
-
const lastAdminUser = await isLastSuperAdminUser(id);
|
|
71
|
-
const superAdminRole = await getService('role').getSuperAdminWithUsersCount();
|
|
72
|
-
const willRemoveSuperAdminRole = !stringIncludes(attributes.roles, superAdminRole.id);
|
|
73
|
-
|
|
74
|
-
if (lastAdminUser && willRemoveSuperAdminRole) {
|
|
75
|
-
throw new ValidationError('You must have at least one user with super admin role.');
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
// cannot disable last super admin
|
|
80
|
-
if (attributes.isActive === false) {
|
|
81
|
-
const lastAdminUser = await isLastSuperAdminUser(id);
|
|
82
|
-
if (lastAdminUser) {
|
|
83
|
-
throw new ValidationError('You must have at least one user with super admin role.');
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
// hash password if a new one is sent
|
|
88
|
-
if (_.has(attributes, 'password')) {
|
|
89
|
-
const hashedPassword = await getService('auth').hashPassword(attributes.password);
|
|
90
|
-
|
|
91
|
-
const updatedUser = await strapi.query('admin::user').update({
|
|
92
|
-
where: { id },
|
|
93
|
-
data: {
|
|
94
|
-
...attributes,
|
|
95
|
-
password: hashedPassword,
|
|
96
|
-
},
|
|
97
|
-
populate: ['roles'],
|
|
98
|
-
});
|
|
99
|
-
|
|
100
|
-
strapi.eventHub.emit('user.update', { user: sanitizeUser(updatedUser) });
|
|
101
|
-
|
|
102
|
-
return updatedUser;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
const updatedUser = await strapi.query('admin::user').update({
|
|
106
|
-
where: { id },
|
|
107
|
-
data: attributes,
|
|
108
|
-
populate: ['roles'],
|
|
109
|
-
});
|
|
110
|
-
|
|
111
|
-
await updateEEDisabledUsersList(id, attributes);
|
|
112
|
-
|
|
113
|
-
if (updatedUser) {
|
|
114
|
-
strapi.eventHub.emit('user.update', { user: sanitizeUser(updatedUser) });
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
return updatedUser;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
/** Delete a user
|
|
121
|
-
* @param id id of the user to delete
|
|
122
|
-
* @returns {Promise<user>}
|
|
123
|
-
*/
|
|
124
|
-
const deleteById = async (id) => {
|
|
125
|
-
// Check at least one super admin remains
|
|
126
|
-
const userToDelete = await strapi.query('admin::user').findOne({
|
|
127
|
-
where: { id },
|
|
128
|
-
populate: ['roles'],
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
if (!userToDelete) {
|
|
132
|
-
return null;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
if (userToDelete) {
|
|
136
|
-
if (userToDelete.roles.some((r) => r.code === SUPER_ADMIN_CODE)) {
|
|
137
|
-
const superAdminRole = await getService('role').getSuperAdminWithUsersCount();
|
|
138
|
-
if (superAdminRole.usersCount === 1) {
|
|
139
|
-
throw new ValidationError('You must have at least one user with super admin role.');
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
const deletedUser = await strapi
|
|
145
|
-
.query('admin::user')
|
|
146
|
-
.delete({ where: { id }, populate: ['roles'] });
|
|
147
|
-
|
|
148
|
-
await removeFromEEDisabledUsersList(id);
|
|
149
|
-
|
|
150
|
-
strapi.eventHub.emit('user.delete', { user: sanitizeUser(deletedUser) });
|
|
151
|
-
|
|
152
|
-
return deletedUser;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
/** Delete a user
|
|
156
|
-
* @param ids ids of the users to delete
|
|
157
|
-
* @returns {Promise<user>}
|
|
158
|
-
*/
|
|
159
|
-
const deleteByIds = async (ids) => {
|
|
160
|
-
// Check at least one super admin remains
|
|
161
|
-
const superAdminRole = await getService('role').getSuperAdminWithUsersCount();
|
|
162
|
-
const nbOfSuperAdminToDelete = await strapi.query('admin::user').count({
|
|
163
|
-
where: {
|
|
164
|
-
id: ids,
|
|
165
|
-
roles: { id: superAdminRole.id },
|
|
166
|
-
},
|
|
167
|
-
});
|
|
168
|
-
|
|
169
|
-
if (superAdminRole.usersCount === nbOfSuperAdminToDelete) {
|
|
170
|
-
throw new ValidationError('You must have at least one user with super admin role.');
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
const deletedUsers = [];
|
|
174
|
-
for (const id of ids) {
|
|
175
|
-
const deletedUser = await strapi.query('admin::user').delete({
|
|
176
|
-
where: { id },
|
|
177
|
-
populate: ['roles'],
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
deletedUsers.push(deletedUser);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
await removeFromEEDisabledUsersList(ids);
|
|
184
|
-
|
|
185
|
-
strapi.eventHub.emit('user.delete', {
|
|
186
|
-
users: deletedUsers.map((deletedUser) => sanitizeUser(deletedUser)),
|
|
187
|
-
});
|
|
188
|
-
|
|
189
|
-
return deletedUsers;
|
|
190
|
-
};
|
|
191
|
-
|
|
192
|
-
const sanitizeUserRoles = (role) => _.pick(role, ['id', 'name', 'description', 'code']);
|
|
193
|
-
|
|
194
|
-
/**
|
|
195
|
-
* Check if a user is the last super admin
|
|
196
|
-
* @param {int|string} userId user's id to look for
|
|
197
|
-
*/
|
|
198
|
-
const isLastSuperAdminUser = async (userId) => {
|
|
199
|
-
const user = await findOne(userId);
|
|
200
|
-
const superAdminRole = await getService('role').getSuperAdminWithUsersCount();
|
|
201
|
-
|
|
202
|
-
return superAdminRole.usersCount === 1 && hasSuperAdminRole(user);
|
|
203
|
-
};
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Remove private user fields
|
|
207
|
-
* @param {Object} user - user to sanitize
|
|
208
|
-
*/
|
|
209
|
-
const sanitizeUser = (user) => {
|
|
210
|
-
return {
|
|
211
|
-
..._.omit(user, ['password', 'resetPasswordToken', 'registrationToken', 'roles']),
|
|
212
|
-
roles: user.roles && user.roles.map(sanitizeUserRoles),
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
|
|
216
|
-
/**
|
|
217
|
-
* Find one user
|
|
218
|
-
*/
|
|
219
|
-
const findOne = async (id, populate = ['roles']) => {
|
|
220
|
-
return strapi.entityService.findOne('admin::user', id, { populate });
|
|
221
|
-
};
|
|
222
|
-
|
|
223
|
-
const getCurrentActiveUserCount = async () => {
|
|
224
|
-
return strapi.db.query('admin::user').count({ where: { isActive: true } });
|
|
225
|
-
};
|
|
226
|
-
|
|
227
|
-
module.exports = {
|
|
228
|
-
updateEEDisabledUsersList,
|
|
229
|
-
removeFromEEDisabledUsersList,
|
|
230
|
-
getCurrentActiveUserCount,
|
|
231
|
-
deleteByIds,
|
|
232
|
-
deleteById,
|
|
233
|
-
updateById,
|
|
234
|
-
};
|