@modular-rest/server 1.11.1 → 1.11.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@modular-rest/server",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.2",
|
|
4
4
|
"description": "a nodejs module based on KOAJS for developing Rest-APIs in a modular solution.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
"@types/koa__cors": "^5.0.0",
|
|
44
44
|
"typescript": "^5.3.3"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|
|
@@ -46,11 +46,13 @@ function runFunction(name, args, user) {
|
|
|
46
46
|
|
|
47
47
|
if (!!hasPermission) {
|
|
48
48
|
reject(
|
|
49
|
-
new Error(`User does not have permission to run function ${name}
|
|
49
|
+
new Error(`User does not have permission to run function ${name}:
|
|
50
|
+
Function permissions: ${func.permissionTypes}
|
|
51
|
+
User permissions: ${
|
|
52
|
+
user.permissionGroup().permissionGroup.validPermissionTypes
|
|
53
|
+
}
|
|
54
|
+
`)
|
|
50
55
|
);
|
|
51
|
-
|
|
52
|
-
console.log("Function permissions", func.permissionTypes);
|
|
53
|
-
console.log("User permissions", user.permissionGroup);
|
|
54
56
|
} else {
|
|
55
57
|
try {
|
|
56
58
|
resolve(func.callback(args));
|