Skip to content

refactor(ocm): add graph webapp metadata carrier - #5852

Merged
glpatcern merged 4 commits into
masterfrom
graph-webapp-metadata-carrier
Nov 4, 2026
Merged

glpatcern merged 4 commits into
masterfrom
graph-webapp-metadata-carrier

Conversation

@MahdiBaghbani

@MahdiBaghbani MahdiBaghbani commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

This PR is part of the cs3org/OCM-STA#20 and cs3org/OCM-STA#48

Summary

  • Add receivedShareDriveItem, the carrier that lets sharedWithMe return a received webapp name. When ReceivedWebappMetadata.Present is true it splices "@ocm.webApp": {"appName": ...} into remoteItem after the stock DriveItem marshal. Nothing produces metadata yet (getSharedWithMe passes nil), so responses are byte-identical until the next PR.
  • Put the key on remoteItem, next to permissions, and leave the single permissions[0] grant alone. Splicing after json.Marshal keeps the generated libregraph types untouched, and nil or not-present metadata returns exactly json.Marshal(DriveItem). An empty appName is still emitted, so "offered without a name" stays distinguishable from "no webapp".
  • Pin the wire contract with four JSON fixtures and a SHA256SUMS manifest (present, omitted, empty name, resource projections). The CERNBox web side vendors the same bytes.
flowchart TD
    M["receivedShareDriveItem.MarshalJSON"] --> P{"metadata Present?"}
    P -->|"nil or false"| RAW["json.Marshal(DriveItem), unchanged bytes"]
    P -->|"true"| B["json.Marshal(DriveItem)"]
    B --> R{"remoteItem is an object?"}
    R -->|"no"| E["error, nothing written"]
    R -->|"yes"| S["remoteItem @ocm.webApp = appName"]
Loading

@MahdiBaghbani MahdiBaghbani self-assigned this Sep 29, 2026
@MahdiBaghbani MahdiBaghbani added feature New feature OCM Open Cloud Mesh labels Sep 29, 2026
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch from 70b1c06 to bc65148 Compare September 29, 2026 12:35
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch from bc65148 to 0ff16eb Compare October 6, 2026 06:45
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch from 0ff16eb to e1a59e4 Compare October 7, 2026 08:38
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch from e1a59e4 to 3389540 Compare October 8, 2026 08:29
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch 3 times, most recently from 9a9cb10 to a26a0dd Compare October 12, 2026 14:26
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch 2 times, most recently from 5136228 to 7a77076 Compare October 15, 2026 19:34
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch from 7a77076 to 5c715a6 Compare October 15, 2026 20:56
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch from 5c715a6 to cf5d7ba Compare October 19, 2026 10:18
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch from cf5d7ba to 0f0cd11 Compare October 19, 2026 13:47
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch from 0f0cd11 to 0c66c14 Compare October 20, 2026 09:20
glpatcern
glpatcern previously approved these changes Oct 22, 2026
@MahdiBaghbani
MahdiBaghbani force-pushed the graph-webapp-metadata-carrier branch from 0c66c14 to 545c12c Compare October 30, 2026 15:36
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch 2 times, most recently from 238c914 to 3b96213 Compare November 4, 2026 09:30
glpatcern
glpatcern previously approved these changes Nov 4, 2026
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch from 3b96213 to 157a8ee Compare November 4, 2026 11:38
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch from 157a8ee to 6e0e013 Compare November 4, 2026 12:53
Base automatically changed from provider-fqdn-token-exchange to master November 4, 2026 12:57
@glpatcern
glpatcern force-pushed the graph-webapp-metadata-carrier branch from 6e0e013 to eadb816 Compare November 4, 2026 12:57
@glpatcern
glpatcern self-requested a review November 4, 2026 12:57
@glpatcern
glpatcern merged commit a0a1e28 into master Nov 4, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature OCM Open Cloud Mesh

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants