@mondaydotcomorg/monday-authorization 1.1.9-fixorcoadd-on-headers-dep-to-monday-authorization.1082 → 1.2.1
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/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [1.2.0] - 2024-01-05
|
|
9
|
+
### Added
|
|
10
|
+
- `isAuthorized` now return the unauthorized objects - regardless to the unauthorized ids (which may be missing resource ids if resource has no id, like `feature` e.g.)
|
|
11
|
+
|
|
8
12
|
## [1.1.0] - 2023-08-09
|
|
9
13
|
|
|
10
14
|
### ⚠ BREAKING CHANGES
|
|
@@ -4,6 +4,7 @@ import { ScopedAction, ScopedActionPermit, ScopedActionResponseObject, ScopeOpti
|
|
|
4
4
|
export interface AuthorizeResponse {
|
|
5
5
|
isAuthorized: boolean;
|
|
6
6
|
unauthorizedIds?: number[];
|
|
7
|
+
unauthorizedObjects?: AuthorizationObject[];
|
|
7
8
|
}
|
|
8
9
|
export declare function setRequestFetchOptions(customMondayFetchOptions: MondayFetchOptions): void;
|
|
9
10
|
export declare function setRedisClient(client: any, grantedFeatureRedisExpirationInSeconds?: number): void;
|
|
@@ -182,7 +182,7 @@ class AuthorizationService {
|
|
|
182
182
|
const unauthorizedIds = unauthorizedObjects
|
|
183
183
|
.filter(obj => !!obj.resource_id)
|
|
184
184
|
.map(obj => obj.resource_id);
|
|
185
|
-
return { isAuthorized: false, unauthorizedIds };
|
|
185
|
+
return { isAuthorized: false, unauthorizedIds, unauthorizedObjects };
|
|
186
186
|
}
|
|
187
187
|
return { isAuthorized: true };
|
|
188
188
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/monday-authorization",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
"@mondaydotcomorg/monday-jwt": "^3.0.10",
|
|
14
14
|
"@mondaydotcomorg/monday-logger": "^3.0.10",
|
|
15
15
|
"node-fetch": "^2.6.7",
|
|
16
|
-
"on-headers": "^1.0.2",
|
|
17
16
|
"ts-node": "^10.0.0"
|
|
18
17
|
},
|
|
19
18
|
"devDependencies": {
|
|
@@ -25,6 +24,7 @@
|
|
|
25
24
|
"ioredis": "^5.2.4",
|
|
26
25
|
"ioredis-mock": "^8.2.2",
|
|
27
26
|
"mocha": "^9.0.1",
|
|
27
|
+
"on-headers": "^1.0.2",
|
|
28
28
|
"supertest": "^6.1.3",
|
|
29
29
|
"tsconfig-paths": "^3.9.0",
|
|
30
30
|
"typescript": "^5.1.6"
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"dist/"
|
|
34
34
|
],
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "f021d0bb0c19666aa89d830aeda0f41c69e76e86"
|
|
36
36
|
}
|