adminforth 1.1.39 → 1.1.41
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/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -991,7 +991,7 @@ class AdminForth {
|
|
|
991
991
|
return { error: `Record with ${primaryKeyColumn.name} ${recordId} not found` };
|
|
992
992
|
}
|
|
993
993
|
const record = body['record'];
|
|
994
|
-
const { allowedActions } = yield interpretResource(adminUser, resource, { requestBody: body, record, oldRecord }, ActionCheckSource.EditRequest);
|
|
994
|
+
const { allowedActions } = yield interpretResource(adminUser, resource, { requestBody: body, newRecord: record, oldRecord }, ActionCheckSource.EditRequest);
|
|
995
995
|
const { allowed, error } = checkAccess(AllowedActionsEnum.edit, allowedActions);
|
|
996
996
|
if (!allowed) {
|
|
997
997
|
return { error };
|
package/index.ts
CHANGED
|
@@ -1132,7 +1132,7 @@ class AdminForth implements AdminForthClass {
|
|
|
1132
1132
|
}
|
|
1133
1133
|
const record = body['record'];
|
|
1134
1134
|
|
|
1135
|
-
const { allowedActions } = await interpretResource(adminUser, resource, { requestBody: body, record, oldRecord}, ActionCheckSource.EditRequest);
|
|
1135
|
+
const { allowedActions } = await interpretResource(adminUser, resource, { requestBody: body, newRecord: record, oldRecord}, ActionCheckSource.EditRequest);
|
|
1136
1136
|
|
|
1137
1137
|
const { allowed, error } = checkAccess(AllowedActionsEnum.edit, allowedActions);
|
|
1138
1138
|
if (!allowed) {
|