@wbce-d9/api 12.5.8 → 12.5.9

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.
@@ -5,9 +5,17 @@ import { version } from './package.js';
5
5
  export function getCacheKey(req) {
6
6
  const path = url.parse(req.originalUrl).pathname;
7
7
  const isGraphQl = path?.startsWith('/graphql');
8
+ const accountability = req.accountability;
9
+ // Include every accountability field that affects permission resolution (see get-permissions.ts),
10
+ // so responses are never shared across roles, shares or share scopes
8
11
  const info = {
9
12
  version,
10
- user: req.accountability?.user || null,
13
+ user: accountability?.user || null,
14
+ role: accountability?.role || null,
15
+ admin: accountability?.admin || false,
16
+ app: accountability?.app || false,
17
+ share: accountability?.share || null,
18
+ share_scope: accountability?.share_scope || null,
11
19
  path,
12
20
  query: isGraphQl ? getGraphqlQueryAndVariables(req) : req.sanitizedQuery,
13
21
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wbce-d9/api",
3
- "version": "12.5.8",
3
+ "version": "12.5.9",
4
4
  "description": "Directus is a real-time API and App dashboard for managing SQL database content",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -144,19 +144,19 @@
144
144
  "tsx": "3.12.6",
145
145
  "uuid-validate": "0.0.3",
146
146
  "@wbce-d9/app": "11.0.0",
147
- "@wbce-d9/constants": "10.0.0",
148
147
  "@wbce-d9/exceptions": "10.0.0",
149
- "@wbce-d9/extensions-sdk": "10.0.4",
150
- "@wbce-d9/schema": "10.0.0",
151
- "@wbce-d9/storage-driver-azure": "10.0.3",
152
148
  "@wbce-d9/specs": "9.26.5",
149
+ "@wbce-d9/schema": "10.0.0",
150
+ "@wbce-d9/extensions-sdk": "10.0.4",
153
151
  "@wbce-d9/storage": "10.0.0",
154
- "@wbce-d9/storage-driver-cloudinary": "10.0.4",
155
- "@wbce-d9/storage-driver-gcs": "10.0.3",
156
- "@wbce-d9/storage-driver-local": "10.0.3",
152
+ "@wbce-d9/constants": "10.0.0",
157
153
  "@wbce-d9/storage-driver-s3": "10.0.3",
154
+ "@wbce-d9/storage-driver-azure": "10.0.3",
158
155
  "@wbce-d9/update-check": "10.0.4",
159
- "@wbce-d9/utils": "10.0.3"
156
+ "@wbce-d9/utils": "10.0.3",
157
+ "@wbce-d9/storage-driver-gcs": "10.0.3",
158
+ "@wbce-d9/storage-driver-cloudinary": "10.0.4",
159
+ "@wbce-d9/storage-driver-local": "10.0.3"
160
160
  },
161
161
  "devDependencies": {
162
162
  "@ngneat/falso": "6.4.0",