not-node 6.3.8 → 6.3.9

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": "not-node",
3
- "version": "6.3.8",
3
+ "version": "6.3.9",
4
4
  "description": "node complimentary part for client side notFramework.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@ const FactoryFormList = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
42
42
  envs.query.filter = notFilter.filter.modifyRules(
43
43
  envs.query.filter,
44
44
  {
45
- owner: req.user._id,
45
+ owner: user.uid,
46
46
  }
47
47
  );
48
48
  }
@@ -42,7 +42,7 @@ const FactoryFormListAndCount = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
42
42
  envs.query.filter = notFilter.filter.modifyRules(
43
43
  envs.query.filter,
44
44
  {
45
- owner: req.user._id,
45
+ owner: user.uid,
46
46
  }
47
47
  );
48
48
  }
@@ -15,7 +15,7 @@ module.exports = class notAppIdentity {
15
15
  /**
16
16
  * Collects various authentification and authorization data from request object
17
17
  * @param {import('../types').notNodeExpressRequest} req ExpressRequest
18
- * @return {object} various authentification data for actor { root:boolean, auth: boolean, role: [string], uid: ObjectId, sid: string, ip:string }
18
+ * @return {import('../types').notAppIdentityData} various authentification data for actor { root:boolean, auth: boolean, role: [string], uid: ObjectId, sid: string, ip:string }
19
19
  */
20
20
  static extractAuthData(req) {
21
21
  const identity = this.#identity.of(req);
package/src/types.js CHANGED
@@ -80,4 +80,17 @@
80
80
  * @typedef {import('express').Request & notNodeExpressRequestProperties} notNodeExpressRequest
81
81
  */
82
82
 
83
+ /**
84
+ *
85
+ * @typedef {object} notAppIdentityData
86
+ * @property {boolean} root //system configuration administrator
87
+ * @property {boolean} admin //system content administrator
88
+ * @property {boolean} auth //authenticated user
89
+ * @property {Array<string>} role //list of roles, exactly one should be primary role
90
+ * @property {string} primaryRole //primary role
91
+ * @property {string} uid //user identificator
92
+ * @property {string} sid //user session identificator
93
+ * @property {string} ip //request source ip
94
+ */
95
+
83
96
  module.exports = {};