@malevich-studio/strapi-sdk-typescript 1.2.18 → 1.2.19
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/dist/cli.cjs +3 -2
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.mjs +3 -2
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -21442,8 +21442,9 @@ class Strapi {
|
|
|
21442
21442
|
}
|
|
21443
21443
|
async can(uid, controller, action) {
|
|
21444
21444
|
if (!this.permissionsList) {
|
|
21445
|
-
const
|
|
21446
|
-
|
|
21445
|
+
const { role } = await this.me();
|
|
21446
|
+
const response = await this.fetchData(`users-permissions/role/${role?.documentId}`);
|
|
21447
|
+
this.permissionsList = response.role.permissions;
|
|
21447
21448
|
}
|
|
21448
21449
|
if (!this.permissionsList[uid]) {
|
|
21449
21450
|
throw new Error(`Permissions for ${uid} not found!`);
|