@mondaydotcomorg/monday-authorization 1.0.11 → 1.0.12

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.
Files changed (2) hide show
  1. package/README.md +6 -7
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -38,16 +38,16 @@ router.use(authorizationCheckMiddleware);
38
38
  router.post('/posts/:postId/like', getAuthorizationMiddleware(action, resourceGetter),
39
39
  like
40
40
  );
41
- router.get('/internal/some_unauthorized_endpoint', skipAuthorizationMiddleware);
41
+ router.get('/internal/some_unauthorized_endpoint', skipAuthorizationMiddleware, handler);
42
42
 
43
43
  ```
44
44
 
45
- resourceGetter is a function that gets the request and return an array of resources.
46
- wrapper_data is additional data to create a wrapper model in the monolith. It is optional.
45
+ `resourceGetter` is a function that gets the request and return an array of resources.
46
+ `wrapper_data` is additional data to create a wrapper model in the monolith. It is optional.
47
47
  In this example the monolith can instantiate a wrapper of post instead of the post itself.
48
48
  The item_id is all that needed for the authorization of posts.
49
49
 
50
- accountId and userId are needed for the authorization and are taken from the authentication middelware
50
+ `accountId` and `userId` are needed for the authorization and are taken from the authentication middelware
51
51
  by default. If you're not using the authentication middleware, you will have to provide a contextGetter
52
52
  function, that looks like this:
53
53
 
@@ -60,7 +60,6 @@ function, that looks like this:
60
60
  }
61
61
  ```
62
62
 
63
- Add authorizationCheckMiddleware to make sure that all routes are covered by authorization check. Put this
63
+ Add `authorizationCheckMiddleware` to make sure that all routes are covered by authorization check. Put this
64
64
  middleware before you define the routes.
65
- If you want to skip authorization, use skipAuthorizationMiddleware.
66
-
65
+ If you want to skip authorization, use `skipAuthorizationMiddleware`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-authorization",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
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": "5045f4bb75bdad8f142bf3d3bd65fa7a955bf39f"
34
+ "gitHead": "16d2310591611bdd3eb76f3badad0835842513cd"
35
35
  }