@crombolo/core 0.40.0 → 0.42.1

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/package.json +2 -2
  2. package/src/permissions.ts +10 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crombolo/core",
3
- "version": "0.40.0",
3
+ "version": "0.42.1",
4
4
  "description": "Internal to crombolo, with no compatibility promise: use @crombolo/crombolo. Domain model, entity keys and shared contracts for crombolo. No I/O.",
5
5
  "license": "MIT",
6
6
  "author": "Crombolo",
@@ -28,6 +28,6 @@
28
28
  "access": "public"
29
29
  },
30
30
  "dependencies": {
31
- "@crombolo/common": "0.40.0"
31
+ "@crombolo/common": "0.42.1"
32
32
  }
33
33
  }
@@ -104,6 +104,16 @@ export const ElementContainerPermissions = {
104
104
  /** The discriminator on a granular permission row. */
105
105
  export type PermissionContext = 'Document' | 'Element' | 'DocumentTypeProperty'
106
106
 
107
+ /** Every permission verb a group can hold, for checking a declared group (story 228). */
108
+ export const KNOWN_PERMISSIONS: ReadonlySet<string> = new Set([
109
+ ...Object.values(DocumentPermissions),
110
+ ...Object.values(FormPermissions),
111
+ ...Object.values(RemotePermissions),
112
+ ...Object.values(MediaPermissions),
113
+ ...Object.values(ElementPermissions),
114
+ ...Object.values(ElementContainerPermissions),
115
+ ])
116
+
107
117
  export const ADMIN_GROUP_ALIAS = 'admin'
108
118
 
109
119
  /** The resolved permission set for a user, assembled from all their groups. */