@live-change/access-control-service 0.2.22 → 0.2.23

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/model.js +62 -11
  2. package/package.json +3 -3
package/model.js CHANGED
@@ -15,9 +15,16 @@ const Access = definition.model({
15
15
  visibilityTest || access.clientHasAdminAccess(client, params.ownerType, params.owner)
16
16
  },
17
17
  properties: {
18
- role: {
19
- type: String,
20
- validation: ['nonEmpty']
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
- userRole: {
36
- type: String,
37
- validation: ['nonEmpty']
42
+ userRoles: {
43
+ type: Array,
44
+ of: {
45
+ type: String,
46
+ validation: ['nonEmpty']
47
+ },
48
+ validation: ['elementsNonEmpty']
38
49
  },
39
- sessionRole: {
40
- type: String,
41
- validation: ['nonEmpty']
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
  }
@@ -55,9 +73,40 @@ const AccessRequest = definition.model({
55
73
  visibilityTest || access.clientHasAdminAccess(client, params.ownerType, params.owner)
56
74
  },
57
75
  properties: {
58
- role: {
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: ['nonEmpty']
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.22",
3
+ "version": "0.2.23",
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": "0.5.20"
24
+ "@live-change/framework": "0.5.27"
25
25
  },
26
- "gitHead": "1bf2012299025806e7d7c0c74af8f29e28094d16"
26
+ "gitHead": "c22bdb7af06561f1dc64b9d9c8cb90154dcd3618"
27
27
  }