Skip to content

Commit 3ade948

Browse files
committed
feat: add @libre.graph.permissions.actions.allowedValues to driveItem
Adds an optional, `$select`-gated instance annotation on `driveItem` that carries the list of libre.graph actions the caller is allowed to perform on the item. Mirrors the annotation of the same name on the `/permissions` endpoint so clients (e.g. a sharing dialog in a search/listing UI) can get the effective-actions view inline without a separate round-trip per item. - Adds `@libre.graph.permissions.actions.allowedValues` to the `driveItem` schema, marked read-only and documented as only populated when requested. - Adds a reusable `driveItemSelect` component parameter with a narrow enum, following the same pattern as PR #38 (feat/download-url). When both land, the enum values merge. - Wires the new parameter to `GetDriveItem`. Rationale discussed in #34.
1 parent 883252e commit 3ade948

1 file changed

Lines changed: 23 additions & 1 deletion

File tree

api/openapi-spec/v1.0.yaml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5187,6 +5187,21 @@ components:
51875187
items:
51885188
type: string
51895189
readOnly: true
5190+
'@libre.graph.permissions.actions.allowedValues':
5191+
type: array
5192+
description: |
5193+
A list of actions the caller is allowed to perform on this item.
5194+
5195+
Only returned when explicitly requested via `$select` on endpoints
5196+
that support it. Mirrors the annotation of the same name on the
5197+
`/permissions` endpoint, allowing clients to learn a caller's
5198+
effective actions on an item without a separate round-trip.
5199+
5200+
See the `/permissions` endpoint for the mapping between CS3
5201+
`ResourcePermissions` and libre.graph actions.
5202+
items:
5203+
type: string
5204+
readOnly: true
51905205
sharingLinkType:
51915206
type: string
51925207
enum: [ internal, view, upload, edit, createOnly, blocksDownload ]
@@ -6279,7 +6294,10 @@ components:
62796294
driveItemSelect:
62806295
name: $select
62816296
in: query
6282-
description: Select additional properties to be returned.
6297+
description: |
6298+
Select properties to be returned. By default all properties are returned, except for
6299+
instance annotations (prefixed with `@`) that are computationally expensive or
6300+
short-lived. Instance annotations must be explicitly requested via `$select`.
62836301
style: form
62846302
explode: false
62856303
schema:
@@ -6288,11 +6306,15 @@ components:
62886306
items:
62896307
enum:
62906308
- '@microsoft.graph.downloadUrl'
6309+
- '@libre.graph.permissions.actions.allowedValues'
62916310
type: string
62926311
examples:
62936312
request download url:
62946313
value:
62956314
- '@microsoft.graph.downloadUrl'
6315+
request allowed actions:
6316+
value:
6317+
- '@libre.graph.permissions.actions.allowedValues'
62966318
drivesFilter:
62976319
name: $filter
62986320
in: query

0 commit comments

Comments
 (0)