@bluedot-innovation/models 8.3.0 → 8.3.2
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 +7 -1
- package/models/Account.js +24 -0
- package/package.json +2 -2
- package/utils/DbInitialiser/indexInitialiser.js +22 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
## 8.3.2
|
|
2
|
+
- Update mongoose version for security patch
|
|
3
|
+
|
|
4
|
+
## 8.3.1
|
|
5
|
+
- Add unique index on canvasSso attributes for testing
|
|
6
|
+
|
|
1
7
|
## 8.3.0
|
|
2
8
|
- Add canvasSso feature to account and identityProvider attribute to user
|
|
3
9
|
|
|
@@ -14,7 +20,7 @@
|
|
|
14
20
|
- Move helloSsoCode from destination to project model
|
|
15
21
|
|
|
16
22
|
## 8.2.2
|
|
17
|
-
- Remove domain from helloSso
|
|
23
|
+
- Remove domain from helloSso feature
|
|
18
24
|
|
|
19
25
|
## 8.2.1
|
|
20
26
|
- Add Hello SSO feature to Account model and helloSsoCode to Destinnation model
|
package/models/Account.js
CHANGED
|
@@ -38,6 +38,30 @@ let AccountSchema = new mongoose.Schema({
|
|
|
38
38
|
|
|
39
39
|
AccountSchema.plugin(patcher)
|
|
40
40
|
|
|
41
|
+
/*
|
|
42
|
+
These indices are only used during testing to validate behaviour that relies on the indices.
|
|
43
|
+
The real indices are created by the script in utils/DbInitializer
|
|
44
|
+
*/
|
|
45
|
+
AccountSchema.index(
|
|
46
|
+
{
|
|
47
|
+
"features.canvasSso.identityProvider": 1
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
unique: true,
|
|
51
|
+
partialFilterExpression: { "features.canvasSso.identityProvider": { $exists:true, $type:"string" } },
|
|
52
|
+
name: "canvasSsoIdentityProviderUnique"
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
AccountSchema.index(
|
|
56
|
+
{
|
|
57
|
+
"features.canvasSso.domain": 1
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
unique: true,
|
|
61
|
+
partialFilterExpression: { "features.canvasSso.domain": { $exists:true, $type:"string" } },
|
|
62
|
+
name: "canvasSsoDomainUnique"
|
|
63
|
+
})
|
|
64
|
+
|
|
41
65
|
// optional mongoose
|
|
42
66
|
let model = (mongooseInstance) => {
|
|
43
67
|
let Account
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bluedot-innovation/models",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.2",
|
|
4
4
|
"main": "Models.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "./node_modules/.bin/eslint -c .eslintrc.js ./models/*.js ./__tests__/**/*.js ./__tests__/**/**/*.js ./schemas/*.js",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"deep-equal": "^1.0.1",
|
|
38
38
|
"fast-deep-equal": "^2.0.1",
|
|
39
39
|
"lodash.clonedeep": "4.5.0",
|
|
40
|
-
"mongoose": "^6.
|
|
40
|
+
"mongoose": "^6.11.5",
|
|
41
41
|
"uuid": "^3.1.0"
|
|
42
42
|
}
|
|
43
43
|
}
|
|
@@ -68,6 +68,28 @@ const indexes = {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
+
],
|
|
72
|
+
account: [
|
|
73
|
+
{
|
|
74
|
+
fields: {
|
|
75
|
+
"features.canvasSso.identityProvider": 1
|
|
76
|
+
},
|
|
77
|
+
options: {
|
|
78
|
+
unique: true,
|
|
79
|
+
partialFilterExpression: { "features.canvasSso.identityProvider": { $exists:true, $type:"string" } },
|
|
80
|
+
name: "canvasSsoIdentityProviderUnique"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
fields: {
|
|
85
|
+
"features.canvasSso.domain": 1
|
|
86
|
+
},
|
|
87
|
+
options: {
|
|
88
|
+
unique: true,
|
|
89
|
+
partialFilterExpression: { "features.canvasSso.domain": { $exists:true, $type:"string" } },
|
|
90
|
+
name: "canvasSsoDomainUnique"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
71
93
|
]
|
|
72
94
|
}
|
|
73
95
|
|