@directus/api 17.0.0 → 17.0.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.
- package/dist/controllers/items.js +8 -7
- package/dist/extensions/lib/sandbox/generate-api-extensions-sandbox-entrypoint.d.ts +1 -1
- package/dist/flows.js +2 -1
- package/dist/middleware/collection-exists.js +6 -6
- package/dist/operations/request/index.js +5 -5
- package/dist/request/agent-with-ip-validation.d.ts +11 -0
- package/dist/request/agent-with-ip-validation.js +34 -0
- package/dist/request/index.js +6 -5
- package/dist/request/is-denied-ip.d.ts +1 -0
- package/dist/request/{validate-ip.js → is-denied-ip.js} +10 -12
- package/dist/services/collections.d.ts +3 -2
- package/dist/services/collections.js +1 -1
- package/dist/services/fields.js +2 -1
- package/dist/services/files.js +4 -3
- package/dist/services/graphql/index.js +3 -2
- package/dist/services/import-export.js +2 -1
- package/dist/services/items.js +2 -1
- package/dist/services/permissions.js +1 -1
- package/dist/services/relations.js +1 -1
- package/dist/services/specifications.js +4 -3
- package/dist/services/utils.js +1 -1
- package/dist/telemetry/utils/get-user-item-count.js +2 -1
- package/dist/types/collection.d.ts +2 -13
- package/dist/utils/get-field-system-rows.d.ts +2 -0
- package/dist/utils/get-field-system-rows.js +17 -0
- package/dist/utils/get-permissions.js +1 -1
- package/dist/utils/get-schema.js +3 -2
- package/dist/utils/merge-permissions-for-share.js +1 -1
- package/dist/utils/should-skip-cache.js +1 -1
- package/dist/websocket/handlers/items.js +2 -1
- package/dist/websocket/messages.d.ts +18 -18
- package/package.json +34 -33
- package/dist/database/system-data/app-access-permissions/app-access-permissions.yaml +0 -107
- package/dist/database/system-data/app-access-permissions/index.d.ts +0 -3
- package/dist/database/system-data/app-access-permissions/index.js +0 -17
- package/dist/database/system-data/app-access-permissions/schema-access-permissions.yaml +0 -17
- package/dist/database/system-data/collections/collections.yaml +0 -103
- package/dist/database/system-data/collections/index.d.ts +0 -2
- package/dist/database/system-data/collections/index.js +0 -9
- package/dist/database/system-data/fields/_defaults.yaml +0 -16
- package/dist/database/system-data/fields/activity.yaml +0 -83
- package/dist/database/system-data/fields/collections.yaml +0 -249
- package/dist/database/system-data/fields/dashboards.yaml +0 -20
- package/dist/database/system-data/fields/extensions.yaml +0 -10
- package/dist/database/system-data/fields/fields.yaml +0 -104
- package/dist/database/system-data/fields/files.yaml +0 -160
- package/dist/database/system-data/fields/flows.yaml +0 -26
- package/dist/database/system-data/fields/folders.yaml +0 -14
- package/dist/database/system-data/fields/index.d.ts +0 -2
- package/dist/database/system-data/fields/index.js +0 -33
- package/dist/database/system-data/fields/migrations.yaml +0 -10
- package/dist/database/system-data/fields/notifications.yaml +0 -15
- package/dist/database/system-data/fields/operations.yaml +0 -23
- package/dist/database/system-data/fields/panels.yaml +0 -29
- package/dist/database/system-data/fields/permissions.yaml +0 -37
- package/dist/database/system-data/fields/presets.yaml +0 -56
- package/dist/database/system-data/fields/relations.yaml +0 -34
- package/dist/database/system-data/fields/revisions.yaml +0 -30
- package/dist/database/system-data/fields/roles.yaml +0 -61
- package/dist/database/system-data/fields/sessions.yaml +0 -16
- package/dist/database/system-data/fields/settings.yaml +0 -471
- package/dist/database/system-data/fields/shares.yaml +0 -83
- package/dist/database/system-data/fields/translations.yaml +0 -27
- package/dist/database/system-data/fields/users.yaml +0 -224
- package/dist/database/system-data/fields/versions.yaml +0 -38
- package/dist/database/system-data/fields/webhooks.yaml +0 -141
- package/dist/database/system-data/relations/index.d.ts +0 -2
- package/dist/database/system-data/relations/index.js +0 -9
- package/dist/database/system-data/relations/relations.yaml +0 -197
- package/dist/request/request-interceptor.d.ts +0 -2
- package/dist/request/request-interceptor.js +0 -28
- package/dist/request/response-interceptor.d.ts +0 -2
- package/dist/request/response-interceptor.js +0 -5
- package/dist/request/validate-ip.d.ts +0 -1
|
@@ -163,53 +163,53 @@ export declare const WebSocketSubscribeMessage: z.ZodDiscriminatedUnion<"type",
|
|
|
163
163
|
}, z.ZodTypeAny, "passthrough">>]>;
|
|
164
164
|
export type WebSocketSubscribeMessage = z.infer<typeof WebSocketSubscribeMessage>;
|
|
165
165
|
export declare const WebSocketItemsMessage: z.ZodUnion<[z.ZodObject<{
|
|
166
|
-
type: z.ZodLiteral<"items">;
|
|
167
166
|
collection: z.ZodString;
|
|
167
|
+
type: z.ZodLiteral<"items">;
|
|
168
168
|
uid: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
169
169
|
action: z.ZodLiteral<"create">;
|
|
170
170
|
data: z.ZodUnion<[z.ZodArray<z.ZodType<Partial<Item>, z.ZodTypeDef, Partial<Item>>, "many">, z.ZodType<Partial<Item>, z.ZodTypeDef, Partial<Item>>]>;
|
|
171
171
|
query: z.ZodOptional<z.ZodType<Query, z.ZodTypeDef, Query>>;
|
|
172
172
|
}, "strip", z.ZodTypeAny, {
|
|
173
|
+
collection: string;
|
|
173
174
|
type: "items";
|
|
174
175
|
action: "create";
|
|
175
176
|
data: (Partial<Item> | Partial<Item>[]) & (Partial<Item> | Partial<Item>[] | undefined);
|
|
176
|
-
collection: string;
|
|
177
177
|
uid?: string | number | undefined;
|
|
178
178
|
query?: Query | undefined;
|
|
179
179
|
}, {
|
|
180
|
+
collection: string;
|
|
180
181
|
type: "items";
|
|
181
182
|
action: "create";
|
|
182
183
|
data: (Partial<Item> | Partial<Item>[]) & (Partial<Item> | Partial<Item>[] | undefined);
|
|
183
|
-
collection: string;
|
|
184
184
|
uid?: string | number | undefined;
|
|
185
185
|
query?: Query | undefined;
|
|
186
186
|
}>, z.ZodObject<{
|
|
187
|
-
type: z.ZodLiteral<"items">;
|
|
188
187
|
collection: z.ZodString;
|
|
188
|
+
type: z.ZodLiteral<"items">;
|
|
189
189
|
uid: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
190
190
|
action: z.ZodLiteral<"read">;
|
|
191
191
|
ids: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
192
192
|
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
193
193
|
query: z.ZodOptional<z.ZodType<Query, z.ZodTypeDef, Query>>;
|
|
194
194
|
}, "strip", z.ZodTypeAny, {
|
|
195
|
+
collection: string;
|
|
195
196
|
type: "items";
|
|
196
197
|
action: "read";
|
|
197
|
-
collection: string;
|
|
198
198
|
uid?: string | number | undefined;
|
|
199
199
|
ids?: (string | number)[] | undefined;
|
|
200
200
|
id?: string | number | undefined;
|
|
201
201
|
query?: Query | undefined;
|
|
202
202
|
}, {
|
|
203
|
+
collection: string;
|
|
203
204
|
type: "items";
|
|
204
205
|
action: "read";
|
|
205
|
-
collection: string;
|
|
206
206
|
uid?: string | number | undefined;
|
|
207
207
|
ids?: (string | number)[] | undefined;
|
|
208
208
|
id?: string | number | undefined;
|
|
209
209
|
query?: Query | undefined;
|
|
210
210
|
}>, z.ZodObject<{
|
|
211
|
-
type: z.ZodLiteral<"items">;
|
|
212
211
|
collection: z.ZodString;
|
|
212
|
+
type: z.ZodLiteral<"items">;
|
|
213
213
|
uid: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
214
214
|
action: z.ZodLiteral<"update">;
|
|
215
215
|
data: z.ZodType<Partial<Item>, z.ZodTypeDef, Partial<Item>>;
|
|
@@ -217,43 +217,43 @@ export declare const WebSocketItemsMessage: z.ZodUnion<[z.ZodObject<{
|
|
|
217
217
|
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
218
218
|
query: z.ZodOptional<z.ZodType<Query, z.ZodTypeDef, Query>>;
|
|
219
219
|
}, "strip", z.ZodTypeAny, {
|
|
220
|
+
collection: string;
|
|
220
221
|
type: "items";
|
|
221
222
|
action: "update";
|
|
222
223
|
data: Partial<Item>;
|
|
223
|
-
collection: string;
|
|
224
224
|
uid?: string | number | undefined;
|
|
225
225
|
ids?: (string | number)[] | undefined;
|
|
226
226
|
id?: string | number | undefined;
|
|
227
227
|
query?: Query | undefined;
|
|
228
228
|
}, {
|
|
229
|
+
collection: string;
|
|
229
230
|
type: "items";
|
|
230
231
|
action: "update";
|
|
231
232
|
data: Partial<Item>;
|
|
232
|
-
collection: string;
|
|
233
233
|
uid?: string | number | undefined;
|
|
234
234
|
ids?: (string | number)[] | undefined;
|
|
235
235
|
id?: string | number | undefined;
|
|
236
236
|
query?: Query | undefined;
|
|
237
237
|
}>, z.ZodObject<{
|
|
238
|
-
type: z.ZodLiteral<"items">;
|
|
239
238
|
collection: z.ZodString;
|
|
239
|
+
type: z.ZodLiteral<"items">;
|
|
240
240
|
uid: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
241
241
|
action: z.ZodLiteral<"delete">;
|
|
242
242
|
ids: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">>;
|
|
243
243
|
id: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodNumber]>>;
|
|
244
244
|
query: z.ZodOptional<z.ZodType<Query, z.ZodTypeDef, Query>>;
|
|
245
245
|
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
collection: string;
|
|
246
247
|
type: "items";
|
|
247
248
|
action: "delete";
|
|
248
|
-
collection: string;
|
|
249
249
|
uid?: string | number | undefined;
|
|
250
250
|
ids?: (string | number)[] | undefined;
|
|
251
251
|
id?: string | number | undefined;
|
|
252
252
|
query?: Query | undefined;
|
|
253
253
|
}, {
|
|
254
|
+
collection: string;
|
|
254
255
|
type: "items";
|
|
255
256
|
action: "delete";
|
|
256
|
-
collection: string;
|
|
257
257
|
uid?: string | number | undefined;
|
|
258
258
|
ids?: (string | number)[] | undefined;
|
|
259
259
|
id?: string | number | undefined;
|
|
@@ -266,14 +266,14 @@ export declare const WebSocketEvent: z.ZodDiscriminatedUnion<"action", [z.ZodObj
|
|
|
266
266
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
267
267
|
key: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
268
268
|
}, "strip", z.ZodTypeAny, {
|
|
269
|
+
collection: string;
|
|
269
270
|
key: string | number;
|
|
270
271
|
action: "create";
|
|
271
|
-
collection: string;
|
|
272
272
|
payload?: Record<string, any> | undefined;
|
|
273
273
|
}, {
|
|
274
|
+
collection: string;
|
|
274
275
|
key: string | number;
|
|
275
276
|
action: "create";
|
|
276
|
-
collection: string;
|
|
277
277
|
payload?: Record<string, any> | undefined;
|
|
278
278
|
}>, z.ZodObject<{
|
|
279
279
|
action: z.ZodLiteral<"update">;
|
|
@@ -281,14 +281,14 @@ export declare const WebSocketEvent: z.ZodDiscriminatedUnion<"action", [z.ZodObj
|
|
|
281
281
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
282
282
|
keys: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
283
283
|
}, "strip", z.ZodTypeAny, {
|
|
284
|
+
collection: string;
|
|
284
285
|
action: "update";
|
|
285
286
|
keys: (string | number)[];
|
|
286
|
-
collection: string;
|
|
287
287
|
payload?: Record<string, any> | undefined;
|
|
288
288
|
}, {
|
|
289
|
+
collection: string;
|
|
289
290
|
action: "update";
|
|
290
291
|
keys: (string | number)[];
|
|
291
|
-
collection: string;
|
|
292
292
|
payload?: Record<string, any> | undefined;
|
|
293
293
|
}>, z.ZodObject<{
|
|
294
294
|
action: z.ZodLiteral<"delete">;
|
|
@@ -296,14 +296,14 @@ export declare const WebSocketEvent: z.ZodDiscriminatedUnion<"action", [z.ZodObj
|
|
|
296
296
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
297
297
|
keys: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodNumber]>, "many">;
|
|
298
298
|
}, "strip", z.ZodTypeAny, {
|
|
299
|
+
collection: string;
|
|
299
300
|
action: "delete";
|
|
300
301
|
keys: (string | number)[];
|
|
301
|
-
collection: string;
|
|
302
302
|
payload?: Record<string, any> | undefined;
|
|
303
303
|
}, {
|
|
304
|
+
collection: string;
|
|
304
305
|
action: "delete";
|
|
305
306
|
keys: (string | number)[];
|
|
306
|
-
collection: string;
|
|
307
307
|
payload?: Record<string, any> | undefined;
|
|
308
308
|
}>]>;
|
|
309
309
|
export type WebSocketEvent = z.infer<typeof WebSocketEvent>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@directus/api",
|
|
3
|
-
"version": "17.0.
|
|
3
|
+
"version": "17.0.1",
|
|
4
4
|
"description": "Directus is a real-time API and App dashboard for managing SQL database content",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"directus",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"@authenio/samlify-node-xmllint": "2.0.0",
|
|
62
|
-
"@aws-sdk/client-ses": "3.
|
|
62
|
+
"@aws-sdk/client-ses": "3.513.0",
|
|
63
63
|
"@directus/format-title": "10.1.0",
|
|
64
64
|
"@godaddy/terminus": "4.12.1",
|
|
65
65
|
"@rollup/plugin-alias": "5.1.0",
|
|
@@ -72,8 +72,8 @@
|
|
|
72
72
|
"bytes": "3.1.2",
|
|
73
73
|
"camelcase": "8.0.0",
|
|
74
74
|
"chalk": "5.3.0",
|
|
75
|
-
"chokidar": "3.
|
|
76
|
-
"commander": "
|
|
75
|
+
"chokidar": "3.6.0",
|
|
76
|
+
"commander": "12.0.0",
|
|
77
77
|
"content-disposition": "0.5.4",
|
|
78
78
|
"cookie-parser": "1.4.6",
|
|
79
79
|
"cors": "2.8.5",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"date-fns": "3.3.1",
|
|
82
82
|
"deep-diff": "1.0.2",
|
|
83
83
|
"destroy": "1.2.0",
|
|
84
|
-
"dotenv": "16.4.
|
|
84
|
+
"dotenv": "16.4.4",
|
|
85
85
|
"encodeurl": "1.0.2",
|
|
86
86
|
"eventemitter2": "6.4.9",
|
|
87
87
|
"execa": "8.0.1",
|
|
@@ -92,14 +92,14 @@
|
|
|
92
92
|
"glob-to-regexp": "0.4.1",
|
|
93
93
|
"graphql": "16.8.1",
|
|
94
94
|
"graphql-compose": "9.0.10",
|
|
95
|
-
"graphql-ws": "5.
|
|
95
|
+
"graphql-ws": "5.15.0",
|
|
96
96
|
"helmet": "7.1.0",
|
|
97
97
|
"icc": "3.0.0",
|
|
98
98
|
"inquirer": "9.2.14",
|
|
99
99
|
"ioredis": "5.3.2",
|
|
100
100
|
"ip-matching": "2.1.2",
|
|
101
101
|
"isolated-vm": "4.7.2",
|
|
102
|
-
"joi": "17.12.
|
|
102
|
+
"joi": "17.12.1",
|
|
103
103
|
"js-yaml": "4.1.0",
|
|
104
104
|
"js2xmlparser": "5.0.0",
|
|
105
105
|
"json2csv": "5.0.7",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"ldapjs": "2.3.3",
|
|
110
110
|
"liquidjs": "10.10.0",
|
|
111
111
|
"lodash-es": "4.17.21",
|
|
112
|
-
"marked": "
|
|
112
|
+
"marked": "12.0.0",
|
|
113
113
|
"micromustache": "8.0.3",
|
|
114
114
|
"mime-types": "2.1.35",
|
|
115
115
|
"minimatch": "9.0.3",
|
|
@@ -132,39 +132,40 @@
|
|
|
132
132
|
"pino-pretty": "10.3.1",
|
|
133
133
|
"qs": "6.11.2",
|
|
134
134
|
"rate-limiter-flexible": "4.0.1",
|
|
135
|
-
"rollup": "4.
|
|
135
|
+
"rollup": "4.10.0",
|
|
136
136
|
"samlify": "2.8.10",
|
|
137
137
|
"sanitize-html": "2.11.0",
|
|
138
138
|
"sharp": "0.33.2",
|
|
139
139
|
"snappy": "7.2.2",
|
|
140
140
|
"stream-json": "1.8.0",
|
|
141
|
-
"tsx": "4.7.
|
|
141
|
+
"tsx": "4.7.1",
|
|
142
142
|
"uuid": "9.0.1",
|
|
143
143
|
"uuid-validate": "0.0.3",
|
|
144
144
|
"wellknown": "0.5.0",
|
|
145
145
|
"ws": "8.16.0",
|
|
146
146
|
"zod": "3.22.4",
|
|
147
|
-
"zod-validation-error": "3.0.
|
|
148
|
-
"@directus/app": "10.15.
|
|
149
|
-
"@directus/env": "1.0.1",
|
|
150
|
-
"@directus/extensions": "0.3.1",
|
|
151
|
-
"@directus/errors": "0.2.2",
|
|
147
|
+
"zod-validation-error": "3.0.2",
|
|
148
|
+
"@directus/app": "10.15.1",
|
|
152
149
|
"@directus/constants": "11.0.3",
|
|
153
|
-
"@directus/
|
|
154
|
-
"@directus/
|
|
155
|
-
"@directus/
|
|
150
|
+
"@directus/env": "1.0.2",
|
|
151
|
+
"@directus/errors": "0.2.3",
|
|
152
|
+
"@directus/extensions": "0.3.2",
|
|
153
|
+
"@directus/extensions-sdk": "10.3.3",
|
|
154
|
+
"@directus/pressure": "1.0.16",
|
|
156
155
|
"@directus/schema": "11.0.1",
|
|
156
|
+
"@directus/memory": "1.0.2",
|
|
157
157
|
"@directus/specs": "10.2.6",
|
|
158
|
-
"@directus/storage": "10.0.
|
|
159
|
-
"@directus/storage-driver-
|
|
160
|
-
"@directus/storage
|
|
161
|
-
"@directus/storage-driver-gcs": "10.0.
|
|
162
|
-
"@directus/storage-driver-local": "10.0.
|
|
163
|
-
"@directus/storage-driver-
|
|
164
|
-
"@directus/
|
|
165
|
-
"@directus/
|
|
166
|
-
"@directus/utils": "11.0.
|
|
167
|
-
"directus": "
|
|
158
|
+
"@directus/storage-driver-azure": "10.0.17",
|
|
159
|
+
"@directus/storage-driver-cloudinary": "10.0.17",
|
|
160
|
+
"@directus/storage": "10.0.10",
|
|
161
|
+
"@directus/storage-driver-gcs": "10.0.17",
|
|
162
|
+
"@directus/storage-driver-local": "10.0.17",
|
|
163
|
+
"@directus/storage-driver-s3": "10.0.17",
|
|
164
|
+
"@directus/system-data": "1.0.0",
|
|
165
|
+
"@directus/storage-driver-supabase": "1.0.9",
|
|
166
|
+
"@directus/utils": "11.0.5",
|
|
167
|
+
"@directus/validation": "0.0.12",
|
|
168
|
+
"directus": "10.9.2"
|
|
168
169
|
},
|
|
169
170
|
"devDependencies": {
|
|
170
171
|
"@ngneat/falso": "7.1.1",
|
|
@@ -189,7 +190,7 @@
|
|
|
189
190
|
"@types/lodash-es": "4.17.12",
|
|
190
191
|
"@types/mime-types": "2.1.4",
|
|
191
192
|
"@types/ms": "0.7.34",
|
|
192
|
-
"@types/node": "18.19.
|
|
193
|
+
"@types/node": "18.19.15",
|
|
193
194
|
"@types/node-schedule": "2.1.6",
|
|
194
195
|
"@types/nodemailer": "6.4.14",
|
|
195
196
|
"@types/object-hash": "3.0.6",
|
|
@@ -207,9 +208,9 @@
|
|
|
207
208
|
"knex-mock-client": "2.0.1",
|
|
208
209
|
"typescript": "5.3.3",
|
|
209
210
|
"vitest": "1.2.2",
|
|
210
|
-
"@directus/
|
|
211
|
+
"@directus/types": "11.0.6",
|
|
211
212
|
"@directus/tsconfig": "1.0.1",
|
|
212
|
-
"@directus/
|
|
213
|
+
"@directus/random": "0.2.6"
|
|
213
214
|
},
|
|
214
215
|
"optionalDependencies": {
|
|
215
216
|
"@keyv/redis": "2.8.4",
|
|
@@ -219,10 +220,10 @@
|
|
|
219
220
|
"oracledb": "6.3.0",
|
|
220
221
|
"pg": "8.11.3",
|
|
221
222
|
"sqlite3": "5.1.7",
|
|
222
|
-
"tedious": "16.
|
|
223
|
+
"tedious": "16.7.1"
|
|
223
224
|
},
|
|
224
225
|
"engines": {
|
|
225
|
-
"node": ">=18.
|
|
226
|
+
"node": ">=18.17.0"
|
|
226
227
|
},
|
|
227
228
|
"scripts": {
|
|
228
229
|
"build": "tsc --project tsconfig.prod.json && copyfiles \"src/**/*.{yaml,liquid}\" -u 1 dist",
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
# NOTE: Activity/collections/fields/presets/relations/revisions will have an extra hardcoded filter
|
|
2
|
-
# to filter out collections you don't have read access
|
|
3
|
-
|
|
4
|
-
- collection: directus_activity
|
|
5
|
-
action: read
|
|
6
|
-
permissions:
|
|
7
|
-
user:
|
|
8
|
-
_eq: $CURRENT_USER
|
|
9
|
-
|
|
10
|
-
- collection: directus_activity
|
|
11
|
-
action: create
|
|
12
|
-
validation:
|
|
13
|
-
comment:
|
|
14
|
-
_nnull: true
|
|
15
|
-
|
|
16
|
-
- collection: directus_presets
|
|
17
|
-
action: read
|
|
18
|
-
permissions:
|
|
19
|
-
_or:
|
|
20
|
-
- user:
|
|
21
|
-
_eq: $CURRENT_USER
|
|
22
|
-
- _and:
|
|
23
|
-
- user:
|
|
24
|
-
_null: true
|
|
25
|
-
- role:
|
|
26
|
-
_eq: $CURRENT_ROLE
|
|
27
|
-
- _and:
|
|
28
|
-
- user:
|
|
29
|
-
_null: true
|
|
30
|
-
- role:
|
|
31
|
-
_null: true
|
|
32
|
-
|
|
33
|
-
- collection: directus_presets
|
|
34
|
-
action: create
|
|
35
|
-
validation:
|
|
36
|
-
user:
|
|
37
|
-
_eq: $CURRENT_USER
|
|
38
|
-
|
|
39
|
-
- collection: directus_presets
|
|
40
|
-
action: update
|
|
41
|
-
permissions:
|
|
42
|
-
user:
|
|
43
|
-
_eq: $CURRENT_USER
|
|
44
|
-
|
|
45
|
-
- collection: directus_presets
|
|
46
|
-
action: delete
|
|
47
|
-
permissions:
|
|
48
|
-
user:
|
|
49
|
-
_eq: $CURRENT_USER
|
|
50
|
-
|
|
51
|
-
- collection: directus_roles
|
|
52
|
-
action: read
|
|
53
|
-
permissions:
|
|
54
|
-
id:
|
|
55
|
-
_eq: $CURRENT_ROLE
|
|
56
|
-
|
|
57
|
-
- collection: directus_settings
|
|
58
|
-
action: read
|
|
59
|
-
|
|
60
|
-
- collection: directus_translations
|
|
61
|
-
action: read
|
|
62
|
-
|
|
63
|
-
- collection: directus_notifications
|
|
64
|
-
action: read
|
|
65
|
-
permissions:
|
|
66
|
-
recipient:
|
|
67
|
-
_eq: $CURRENT_USER
|
|
68
|
-
|
|
69
|
-
- collection: directus_notifications
|
|
70
|
-
action: update
|
|
71
|
-
permissions:
|
|
72
|
-
recipient:
|
|
73
|
-
_eq: $CURRENT_USER
|
|
74
|
-
fields:
|
|
75
|
-
- status
|
|
76
|
-
|
|
77
|
-
- collection: directus_shares
|
|
78
|
-
action: read
|
|
79
|
-
permissions:
|
|
80
|
-
user_created:
|
|
81
|
-
_eq: $CURRENT_USER
|
|
82
|
-
|
|
83
|
-
- collection: directus_users
|
|
84
|
-
action: read
|
|
85
|
-
permissions:
|
|
86
|
-
id:
|
|
87
|
-
_eq: $CURRENT_USER
|
|
88
|
-
fields:
|
|
89
|
-
- id
|
|
90
|
-
- first_name
|
|
91
|
-
- last_name
|
|
92
|
-
- last_page
|
|
93
|
-
- email
|
|
94
|
-
- password
|
|
95
|
-
- location
|
|
96
|
-
- title
|
|
97
|
-
- description
|
|
98
|
-
- tags
|
|
99
|
-
- preferences_divider
|
|
100
|
-
- avatar
|
|
101
|
-
- language
|
|
102
|
-
- appearance
|
|
103
|
-
- theme_light
|
|
104
|
-
- theme_dark
|
|
105
|
-
- tfa_secret
|
|
106
|
-
- status
|
|
107
|
-
- role
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { merge } from 'lodash-es';
|
|
2
|
-
import path, { dirname } from 'node:path';
|
|
3
|
-
import { fileURLToPath } from 'node:url';
|
|
4
|
-
import { requireYAML } from '../../../utils/require-yaml.js';
|
|
5
|
-
const defaults = {
|
|
6
|
-
role: null,
|
|
7
|
-
permissions: {},
|
|
8
|
-
validation: null,
|
|
9
|
-
presets: null,
|
|
10
|
-
fields: ['*'],
|
|
11
|
-
system: true,
|
|
12
|
-
};
|
|
13
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
14
|
-
const schemaPermissionsRaw = requireYAML(path.resolve(__dirname, './schema-access-permissions.yaml'));
|
|
15
|
-
const permissions = requireYAML(path.resolve(__dirname, './app-access-permissions.yaml'));
|
|
16
|
-
export const schemaPermissions = schemaPermissionsRaw.map((row) => merge({}, defaults, row));
|
|
17
|
-
export const appAccessMinimalPermissions = [...schemaPermissions, ...permissions].map((row) => merge({}, defaults, row));
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
# NOTE: Activity/collections/fields/presets/relations/revisions will have an extra hardcoded filter
|
|
2
|
-
# to filter out collections you don't have read access
|
|
3
|
-
|
|
4
|
-
- collection: directus_collections
|
|
5
|
-
action: read
|
|
6
|
-
|
|
7
|
-
- collection: directus_fields
|
|
8
|
-
action: read
|
|
9
|
-
|
|
10
|
-
- collection: directus_permissions
|
|
11
|
-
action: read
|
|
12
|
-
permissions:
|
|
13
|
-
role:
|
|
14
|
-
_eq: $CURRENT_ROLE
|
|
15
|
-
|
|
16
|
-
- collection: directus_relations
|
|
17
|
-
action: read
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
table: directus_collections
|
|
2
|
-
|
|
3
|
-
defaults:
|
|
4
|
-
collection: null
|
|
5
|
-
hidden: false
|
|
6
|
-
singleton: false
|
|
7
|
-
icon: null
|
|
8
|
-
note: null
|
|
9
|
-
translations: null
|
|
10
|
-
display_template: null
|
|
11
|
-
accountability: 'all'
|
|
12
|
-
|
|
13
|
-
data:
|
|
14
|
-
- collection: directus_activity
|
|
15
|
-
note: $t:directus_collection.directus_activity
|
|
16
|
-
accountability: null
|
|
17
|
-
|
|
18
|
-
- collection: directus_collections
|
|
19
|
-
icon: database
|
|
20
|
-
note: $t:directus_collection.directus_collections
|
|
21
|
-
|
|
22
|
-
- collection: directus_fields
|
|
23
|
-
icon: input
|
|
24
|
-
note: $t:directus_collection.directus_fields
|
|
25
|
-
|
|
26
|
-
- collection: directus_files
|
|
27
|
-
icon: folder
|
|
28
|
-
note: $t:directus_collection.directus_files
|
|
29
|
-
display_template: '{{ $thumbnail }} {{ title }}'
|
|
30
|
-
|
|
31
|
-
- collection: directus_folders
|
|
32
|
-
note: $t:directus_collection.directus_folders
|
|
33
|
-
display_template: '{{ name }}'
|
|
34
|
-
|
|
35
|
-
- collection: directus_migrations
|
|
36
|
-
note: $t:directus_collection.directus_migrations
|
|
37
|
-
|
|
38
|
-
- collection: directus_permissions
|
|
39
|
-
icon: admin_panel_settings
|
|
40
|
-
note: $t:directus_collection.directus_permissions
|
|
41
|
-
|
|
42
|
-
- collection: directus_presets
|
|
43
|
-
icon: bookmark
|
|
44
|
-
note: $t:directus_collection.directus_presets
|
|
45
|
-
accountability: null
|
|
46
|
-
|
|
47
|
-
- collection: directus_relations
|
|
48
|
-
icon: merge_type
|
|
49
|
-
note: $t:directus_collection.directus_relations
|
|
50
|
-
|
|
51
|
-
- collection: directus_revisions
|
|
52
|
-
note: $t:directus_collection.directus_revisions
|
|
53
|
-
accountability: null
|
|
54
|
-
|
|
55
|
-
- collection: directus_roles
|
|
56
|
-
icon: supervised_user_circle
|
|
57
|
-
note: $t:directus_collection.directus_roles
|
|
58
|
-
|
|
59
|
-
- collection: directus_sessions
|
|
60
|
-
note: $t:directus_collection.directus_sessions
|
|
61
|
-
|
|
62
|
-
- collection: directus_settings
|
|
63
|
-
singleton: true
|
|
64
|
-
note: $t:directus_collection.directus_settings
|
|
65
|
-
|
|
66
|
-
- collection: directus_users
|
|
67
|
-
archive_field: status
|
|
68
|
-
archive_value: archived
|
|
69
|
-
unarchive_value: draft
|
|
70
|
-
icon: people_alt
|
|
71
|
-
note: $t:directus_collection.directus_users
|
|
72
|
-
display_template: '{{ first_name }} {{ last_name }}'
|
|
73
|
-
|
|
74
|
-
- collection: directus_webhooks
|
|
75
|
-
note: $t:directus_collection.directus_webhooks
|
|
76
|
-
|
|
77
|
-
- collection: directus_dashboards
|
|
78
|
-
note: $t:directus_collection.directus_dashboards
|
|
79
|
-
|
|
80
|
-
- collection: directus_panels
|
|
81
|
-
note: $t:directus_collection.directus_panels
|
|
82
|
-
|
|
83
|
-
- collection: directus_notifications
|
|
84
|
-
note: $t:directus_collection.directus_notifications
|
|
85
|
-
|
|
86
|
-
- collection: directus_shares
|
|
87
|
-
icon: share
|
|
88
|
-
note: $t:directus_collection.directus_shares
|
|
89
|
-
|
|
90
|
-
- collection: directus_flows
|
|
91
|
-
note: $t:directus_collection.directus_flows
|
|
92
|
-
|
|
93
|
-
- collection: directus_operations
|
|
94
|
-
note: $t:directus_collection.directus_operations
|
|
95
|
-
|
|
96
|
-
- collection: directus_translations
|
|
97
|
-
note: $t:directus_collection.directus_translations
|
|
98
|
-
|
|
99
|
-
- collection: directus_versions
|
|
100
|
-
note: $t:directus_collection.directus_versions
|
|
101
|
-
|
|
102
|
-
- collection: directus_extensions
|
|
103
|
-
note: $t:directus_collection.directus_extensions
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { merge } from 'lodash-es';
|
|
2
|
-
import { requireYAML } from '../../../utils/require-yaml.js';
|
|
3
|
-
import { dirname, resolve } from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
6
|
-
const systemData = requireYAML(resolve(__dirname, './collections.yaml'));
|
|
7
|
-
export const systemCollectionRows = systemData['data'].map((row) => {
|
|
8
|
-
return merge({ system: true }, systemData['defaults'], row);
|
|
9
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
collection: null
|
|
2
|
-
field: null
|
|
3
|
-
special: null
|
|
4
|
-
interface: null
|
|
5
|
-
options: null
|
|
6
|
-
display: null
|
|
7
|
-
display_options: null
|
|
8
|
-
readonly: false
|
|
9
|
-
hidden: false
|
|
10
|
-
sort: null
|
|
11
|
-
width: full
|
|
12
|
-
group: null
|
|
13
|
-
translations: null
|
|
14
|
-
note: null
|
|
15
|
-
conditions: null
|
|
16
|
-
required: false
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
table: directus_activity
|
|
2
|
-
|
|
3
|
-
fields:
|
|
4
|
-
- field: id
|
|
5
|
-
width: half
|
|
6
|
-
|
|
7
|
-
- field: item
|
|
8
|
-
width: half
|
|
9
|
-
|
|
10
|
-
- field: action
|
|
11
|
-
display: labels
|
|
12
|
-
display_options:
|
|
13
|
-
choices:
|
|
14
|
-
- text: $t:field_options.directus_activity.create
|
|
15
|
-
value: create
|
|
16
|
-
foreground: 'var(--theme--primary)'
|
|
17
|
-
background: 'var(--theme--primary-subdued)'
|
|
18
|
-
- text: $t:field_options.directus_activity.update
|
|
19
|
-
value: update
|
|
20
|
-
foreground: 'var(--blue)'
|
|
21
|
-
background: 'var(--blue-25)'
|
|
22
|
-
- text: $t:field_options.directus_activity.delete
|
|
23
|
-
value: delete
|
|
24
|
-
foreground: 'var(--theme--danger)'
|
|
25
|
-
background: 'var(--danger-25)'
|
|
26
|
-
- text: $t:field_options.directus_activity.login
|
|
27
|
-
value: login
|
|
28
|
-
foreground: 'var(--purple)'
|
|
29
|
-
background: 'var(--purple-25)'
|
|
30
|
-
width: half
|
|
31
|
-
|
|
32
|
-
- field: collection
|
|
33
|
-
display: collection
|
|
34
|
-
display_options:
|
|
35
|
-
icon: true
|
|
36
|
-
width: half
|
|
37
|
-
|
|
38
|
-
- field: timestamp
|
|
39
|
-
display: datetime
|
|
40
|
-
special:
|
|
41
|
-
- date-created
|
|
42
|
-
- cast-timestamp
|
|
43
|
-
options:
|
|
44
|
-
relative: true
|
|
45
|
-
width: half
|
|
46
|
-
|
|
47
|
-
- field: user
|
|
48
|
-
display: user
|
|
49
|
-
width: half
|
|
50
|
-
|
|
51
|
-
- field: comment
|
|
52
|
-
display: formatted-value
|
|
53
|
-
display_options:
|
|
54
|
-
color: 'var(--theme--foreground-subdued)'
|
|
55
|
-
width: half
|
|
56
|
-
|
|
57
|
-
- field: user_agent
|
|
58
|
-
display: formatted-value
|
|
59
|
-
display_options:
|
|
60
|
-
font: monospace
|
|
61
|
-
width: half
|
|
62
|
-
|
|
63
|
-
- field: origin
|
|
64
|
-
display: formatted-value
|
|
65
|
-
display_options:
|
|
66
|
-
font: monospace
|
|
67
|
-
width: half
|
|
68
|
-
|
|
69
|
-
- field: ip
|
|
70
|
-
display: formatted-value
|
|
71
|
-
display_options:
|
|
72
|
-
font: monospace
|
|
73
|
-
width: half
|
|
74
|
-
|
|
75
|
-
- field: revisions
|
|
76
|
-
interface: list-o2m
|
|
77
|
-
special:
|
|
78
|
-
- o2m
|
|
79
|
-
options:
|
|
80
|
-
fields:
|
|
81
|
-
- collection
|
|
82
|
-
- item
|
|
83
|
-
width: half
|