Skip to content

Commit 3a8caee

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 7fb96d4 commit 3a8caee

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
@@ -4990,6 +4990,21 @@ components:
49904990
'@UI.Hidden':
49914991
description: Properties or facets (see UI.Facet) annotated with this term will not be rendered if the annotation evaluates to true. Users can set this to hide permissions.
49924992
type: boolean
4993+
'@libre.graph.permissions.actions.allowedValues':
4994+
type: array
4995+
description: |
4996+
A list of actions the caller is allowed to perform on this item.
4997+
4998+
Only returned when explicitly requested via `$select` on endpoints
4999+
that support it. Mirrors the annotation of the same name on the
5000+
`/permissions` endpoint, allowing clients to learn a caller's
5001+
effective actions on an item without a separate round-trip.
5002+
5003+
See the `/permissions` endpoint for the mapping between CS3
5004+
`ResourcePermissions` and libre.graph actions.
5005+
items:
5006+
type: string
5007+
readOnly: true
49935008
sharingLinkType:
49945009
type: string
49955010
enum: [ internal, view, upload, edit, createOnly, blocksDownload ]
@@ -5987,7 +6002,10 @@ components:
59876002
driveItemSelect:
59886003
name: $select
59896004
in: query
5990-
description: Select additional properties to be returned.
6005+
description: |
6006+
Select properties to be returned. By default all properties are returned, except for
6007+
instance annotations (prefixed with `@`) that are computationally expensive or
6008+
short-lived. Instance annotations must be explicitly requested via `$select`.
59916009
style: form
59926010
explode: false
59936011
schema:
@@ -5996,11 +6014,15 @@ components:
59966014
items:
59976015
enum:
59986016
- '@microsoft.graph.downloadUrl'
6017+
- '@libre.graph.permissions.actions.allowedValues'
59996018
type: string
60006019
examples:
60016020
request download url:
60026021
value:
60036022
- '@microsoft.graph.downloadUrl'
6023+
request allowed actions:
6024+
value:
6025+
- '@libre.graph.permissions.actions.allowedValues'
60046026
drivesFilter:
60056027
name: $filter
60066028
in: query

0 commit comments

Comments
 (0)