@mondaydotcomorg/monday-authorization 1.0.19 → 1.0.20
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.
|
@@ -79,7 +79,7 @@ class AuthorizationService {
|
|
|
79
79
|
logger.info({
|
|
80
80
|
resources: JSON.stringify(unauthorizedObjects),
|
|
81
81
|
}, 'AuthorizationService: resource is unauthorized');
|
|
82
|
-
const unauthorizedIds = unauthorizedObjects.map(obj => obj.resource_id);
|
|
82
|
+
const unauthorizedIds = unauthorizedObjects.filter(obj => !!obj.resource_id).map(obj => obj.resource_id);
|
|
83
83
|
return { isAuthorized: false, unauthorizedIds };
|
|
84
84
|
}
|
|
85
85
|
return { isAuthorized: true };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Request, Response } from 'express';
|
|
2
2
|
export interface Resource {
|
|
3
|
-
id
|
|
3
|
+
id?: number;
|
|
4
4
|
type: string;
|
|
5
5
|
wrapperData?: object;
|
|
6
6
|
}
|
|
@@ -12,7 +12,7 @@ export interface Context {
|
|
|
12
12
|
}
|
|
13
13
|
export declare type ContextGetter = (request: BaseRequest) => Context;
|
|
14
14
|
export interface AuthorizationObject {
|
|
15
|
-
resource_id
|
|
15
|
+
resource_id?: Resource['id'];
|
|
16
16
|
resource_type: Resource['type'];
|
|
17
17
|
wrapper_data?: Resource['wrapperData'];
|
|
18
18
|
action: Action;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/monday-authorization",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.20",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"files": [
|
|
32
32
|
"dist/"
|
|
33
33
|
],
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "885a2695f0c341cf28613bb0a49d26a2c96d01d7"
|
|
35
35
|
}
|