@live-change/access-control-service 0.2.21 → 0.2.24
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/model.js +64 -13
- package/package.json +3 -3
package/model.js
CHANGED
|
@@ -7,7 +7,7 @@ const Access = definition.model({
|
|
|
7
7
|
sessionOrUserItem: {
|
|
8
8
|
ownerReadAccess: () => true
|
|
9
9
|
},
|
|
10
|
-
|
|
10
|
+
relatedToAny: {
|
|
11
11
|
to: 'object',
|
|
12
12
|
readAccess: (params, { client, context, visibilityTest }) =>
|
|
13
13
|
visibilityTest || access.clientHasAnyAccess(client, params.ownerType, params.owner),
|
|
@@ -15,9 +15,16 @@ const Access = definition.model({
|
|
|
15
15
|
visibilityTest || access.clientHasAdminAccess(client, params.ownerType, params.owner)
|
|
16
16
|
},
|
|
17
17
|
properties: {
|
|
18
|
-
|
|
19
|
-
type:
|
|
20
|
-
|
|
18
|
+
roles: {
|
|
19
|
+
type: Array,
|
|
20
|
+
of: {
|
|
21
|
+
type: String,
|
|
22
|
+
validation: ['nonEmpty']
|
|
23
|
+
},
|
|
24
|
+
validation: ['elementsNonEmpty']
|
|
25
|
+
},
|
|
26
|
+
lastUpdate: {
|
|
27
|
+
type: Date
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
30
|
})
|
|
@@ -32,14 +39,25 @@ const PublicAccess = definition.model({
|
|
|
32
39
|
visibilityTest || access.clientHasAdminAccess(client, params.ownerType, params.owner)
|
|
33
40
|
},
|
|
34
41
|
properties: {
|
|
35
|
-
|
|
36
|
-
type:
|
|
37
|
-
|
|
42
|
+
userRoles: {
|
|
43
|
+
type: Array,
|
|
44
|
+
of: {
|
|
45
|
+
type: String,
|
|
46
|
+
validation: ['nonEmpty']
|
|
47
|
+
},
|
|
48
|
+
validation: ['elementsNonEmpty']
|
|
38
49
|
},
|
|
39
|
-
|
|
40
|
-
type:
|
|
41
|
-
|
|
50
|
+
sessionRoles: {
|
|
51
|
+
type: Array,
|
|
52
|
+
of: {
|
|
53
|
+
type: String,
|
|
54
|
+
validation: ['nonEmpty']
|
|
55
|
+
},
|
|
56
|
+
validation: ['elementsNonEmpty']
|
|
42
57
|
},
|
|
58
|
+
lastUpdate: {
|
|
59
|
+
type: Date
|
|
60
|
+
}
|
|
43
61
|
},
|
|
44
62
|
indexes: {
|
|
45
63
|
}
|
|
@@ -49,15 +67,46 @@ const AccessRequest = definition.model({
|
|
|
49
67
|
name: 'AccessRequest',
|
|
50
68
|
sessionOrUserItem: {
|
|
51
69
|
},
|
|
52
|
-
|
|
70
|
+
relatedToAny: {
|
|
53
71
|
to: 'object',
|
|
54
72
|
readAccess: (params, { client, context, visibilityTest }) =>
|
|
55
73
|
visibilityTest || access.clientHasAdminAccess(client, params.ownerType, params.owner)
|
|
56
74
|
},
|
|
57
75
|
properties: {
|
|
58
|
-
|
|
76
|
+
roles: {
|
|
77
|
+
type: Array,
|
|
78
|
+
of: {
|
|
79
|
+
type: String,
|
|
80
|
+
validation: ['nonEmpty']
|
|
81
|
+
},
|
|
82
|
+
validation: ['elementsNonEmpty']
|
|
83
|
+
},
|
|
84
|
+
message: {
|
|
59
85
|
type: String,
|
|
60
|
-
validation: [
|
|
86
|
+
validation: []
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
indexes: {
|
|
90
|
+
}
|
|
91
|
+
})
|
|
92
|
+
|
|
93
|
+
/*
|
|
94
|
+
const AccessInvite = definition.model({
|
|
95
|
+
name: 'AccessInvite',
|
|
96
|
+
userOrContactItem: {},
|
|
97
|
+
relatedToAny: {
|
|
98
|
+
to: 'object',
|
|
99
|
+
readAccess: (params, {client, context, visibilityTest}) =>
|
|
100
|
+
visibilityTest || access.clientHasAdminAccess(client, params.ownerType, params.owner)
|
|
101
|
+
},
|
|
102
|
+
properties: {
|
|
103
|
+
roles: {
|
|
104
|
+
type: Array,
|
|
105
|
+
of: {
|
|
106
|
+
type: String,
|
|
107
|
+
validation: ['nonEmpty']
|
|
108
|
+
},
|
|
109
|
+
validation: ['elementsNonEmpty']
|
|
61
110
|
},
|
|
62
111
|
message: {
|
|
63
112
|
type: String,
|
|
@@ -65,7 +114,9 @@ const AccessRequest = definition.model({
|
|
|
65
114
|
}
|
|
66
115
|
},
|
|
67
116
|
indexes: {
|
|
117
|
+
|
|
68
118
|
}
|
|
69
119
|
})
|
|
120
|
+
*/
|
|
70
121
|
|
|
71
122
|
module.exports = { Access, PublicAccess, AccessRequest }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/access-control-service",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"url": "https://www.viamage.com/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@live-change/framework": "
|
|
24
|
+
"@live-change/framework": "0.5.27"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "2ccfeae4613bf874d5bfc215a71c98e57b3eb0e5"
|
|
27
27
|
}
|