@live-change/cron-service 0.9.180 → 0.9.182

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 (3) hide show
  1. package/interval.js +11 -2
  2. package/package.json +3 -3
  3. package/schedule.js +11 -2
package/interval.js CHANGED
@@ -8,6 +8,13 @@ import createWaitingFunction from './waitForDone.js'
8
8
 
9
9
  const waitForTasks = createWaitingFunction(definition)
10
10
 
11
+ function intervalAccessControlObjects({ ownerType, owner, topicType, topic }) {
12
+ return [{
13
+ objectType: ownerType,
14
+ object: owner
15
+ }]
16
+ }
17
+
11
18
  export const Interval = definition.model({
12
19
  name: "Interval",
13
20
  propertyOfAny: {
@@ -15,10 +22,12 @@ export const Interval = definition.model({
15
22
  ownerTypes: config.ownerTypes,
16
23
  topicTypes: config.topicTypes,
17
24
  writeAccessControl: {
18
- roles: config.adminRoles
25
+ roles: config.adminRoles,
26
+ objects: intervalAccessControlObjects
19
27
  },
20
28
  readAccessControl: {
21
- roles: [...config.adminRoles, ...config.readerRoles]
29
+ roles: [...config.adminRoles, ...config.readerRoles],
30
+ objects: intervalAccessControlObjects
22
31
  },
23
32
  readAllAccess: ['admin'],
24
33
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@live-change/cron-service",
3
- "version": "0.9.180",
3
+ "version": "0.9.182",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "type": "module",
24
24
  "dependencies": {
25
- "@live-change/framework": "^0.9.180"
25
+ "@live-change/framework": "^0.9.182"
26
26
  },
27
- "gitHead": "c6ee30c8f36f989714e8fc7ec71daadb895b2b6e"
27
+ "gitHead": "e12068c10b76a5661032a3df85d7168f228192af"
28
28
  }
package/schedule.js CHANGED
@@ -5,6 +5,13 @@ import definition from './definition.js'
5
5
  import config from './config.js'
6
6
  import { triggerType, runTrigger, doRunTrigger } from './run.js'
7
7
 
8
+ function scheduleAccessControlObjects({ ownerType, owner, topicType, topic }) {
9
+ return [{
10
+ objectType: ownerType,
11
+ object: owner
12
+ }]
13
+ }
14
+
8
15
  export const Schedule = definition.model({
9
16
  name: "Schedule",
10
17
  propertyOfAny: {
@@ -12,10 +19,12 @@ export const Schedule = definition.model({
12
19
  ownerTypes: config.ownerTypes,
13
20
  topicTypes: config.topicTypes,
14
21
  writeAccessControl: {
15
- roles: config.adminRoles
22
+ roles: config.adminRoles,
23
+ objects: scheduleAccessControlObjects
16
24
  },
17
25
  readAccessControl: {
18
- roles: config.adminRoles
26
+ roles: config.adminRoles,
27
+ objects: scheduleAccessControlObjects
19
28
  },
20
29
  readAllAccess: ['admin'],
21
30
  },