not-node 6.3.20 → 6.3.21
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
|
@@ -2,12 +2,7 @@
|
|
|
2
2
|
const Form = require("../form/form");
|
|
3
3
|
const { firstLetterToUpper } = require("../common");
|
|
4
4
|
//form
|
|
5
|
-
const FIELDS = [
|
|
6
|
-
["activeUserId", { required: true }, "not-node//objectId"],
|
|
7
|
-
["activeUser", "not-node//requiredObject"],
|
|
8
|
-
["ip", "not-node//ip"],
|
|
9
|
-
["identity", "not-node//requiredObject"],
|
|
10
|
-
];
|
|
5
|
+
const FIELDS = [["identity", "not-node//requiredObject"]];
|
|
11
6
|
|
|
12
7
|
module.exports = ({ MODULE_NAME, MODEL_NAME, actionName }) => {
|
|
13
8
|
const FORM_NAME = `${MODULE_NAME}:${MODEL_NAME}:${firstLetterToUpper(
|
|
@@ -4,9 +4,7 @@ const { firstLetterToUpper } = require("../common");
|
|
|
4
4
|
//form
|
|
5
5
|
const FIELDS = [
|
|
6
6
|
["targetID", { required: true }, "not-node//ID"],
|
|
7
|
-
|
|
8
|
-
["activeUser", "not-node//requiredObject"],
|
|
9
|
-
["ip", "not-node//ip"],
|
|
7
|
+
|
|
10
8
|
["identity", "not-node//requiredObject"],
|
|
11
9
|
];
|
|
12
10
|
|
|
@@ -5,9 +5,6 @@ const { firstLetterToUpper } = require("../common");
|
|
|
5
5
|
//form
|
|
6
6
|
const FIELDS = [
|
|
7
7
|
["targetId", { required: true }, "not-node//objectId"],
|
|
8
|
-
["activeUserId", { required: true }, "not-node//objectId"],
|
|
9
|
-
["activeUser", "not-node//requiredObject"],
|
|
10
|
-
["ip", "not-node//ip"],
|
|
11
8
|
["identity", "not-node//requiredObject"],
|
|
12
9
|
];
|
|
13
10
|
|
package/src/generic/form.list.js
CHANGED
|
@@ -5,9 +5,6 @@ const notAppIdentity = require("../identity");
|
|
|
5
5
|
|
|
6
6
|
const FIELDS = [
|
|
7
7
|
["query", `not-filter//_filterQuery`],
|
|
8
|
-
["activeUserId", { required: true }, "not-node//objectId"],
|
|
9
|
-
["activeUser", "not-node//requiredObject"],
|
|
10
|
-
["ip", "not-node//ip"],
|
|
11
8
|
["identity", "not-node//requiredObject"],
|
|
12
9
|
];
|
|
13
10
|
|
|
@@ -5,9 +5,6 @@ const notAppIdentity = require("../identity");
|
|
|
5
5
|
|
|
6
6
|
const FIELDS = [
|
|
7
7
|
["query", `not-filter//_filterQuery`],
|
|
8
|
-
["activeUserId", { required: true }, "not-node//objectId"],
|
|
9
|
-
["activeUser", "not-node//requiredObject"],
|
|
10
|
-
["ip", "not-node//ip"],
|
|
11
8
|
["identity", "not-node//requiredObject"],
|
|
12
9
|
];
|
|
13
10
|
|
package/src/init/lib/security.js
CHANGED
|
@@ -4,7 +4,6 @@ module.exports = class InitSecurity {
|
|
|
4
4
|
getCSPDirectives({ config }) {
|
|
5
5
|
try {
|
|
6
6
|
let corsArr = config.get("cors");
|
|
7
|
-
let corsLine = corsArr ? corsArr.join(" ") : "";
|
|
8
7
|
let CSPDirectives = config.get("CSP");
|
|
9
8
|
let result = {};
|
|
10
9
|
Object.keys(CSPDirectives).forEach((nm) => {
|
|
@@ -13,7 +12,7 @@ module.exports = class InitSecurity {
|
|
|
13
12
|
Array.isArray(corsArr) &&
|
|
14
13
|
["default-src", "connect-src"].includes(nm)
|
|
15
14
|
) {
|
|
16
|
-
result[nm].push(...
|
|
15
|
+
result[nm].push(...corsArr);
|
|
17
16
|
}
|
|
18
17
|
});
|
|
19
18
|
return result;
|