Skip to content

feat(gateway): add SetImmutable/UnsetImmutable RPCs#275

Open
flash7777 wants to merge 1 commit into
cs3org:mainfrom
flash7777:feat/gateway-immutable-rpc
Open

feat(gateway): add SetImmutable/UnsetImmutable RPCs#275
flash7777 wants to merge 1 commit into
cs3org:mainfrom
flash7777:feat/gateway-immutable-rpc

Conversation

@flash7777

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #272. Exposes SetImmutable and UnsetImmutable on the Gateway API so that higher-level clients (like the OpenCloud Graph API) can call them through the gateway without needing direct StorageProvider access.

Changes

  • cs3/gateway/v1beta1/gateway_api.proto: add SetImmutable and UnsetImmutable RPCs using the existing request/response types from cs3.storage.provider.v1beta1

Context

#272 added SetImmutable/UnsetImmutable to the StorageProvider API. The Reva gateway already proxies these calls (server-side), but the gateway proto client interface doesn't expose them yet. This blocks the OpenCloud Graph API from using these RPCs through the standard gateway client.

Test plan

  • Proto compiles
  • Generated Go code includes new gateway client methods

flash7777 pushed a commit to flash7777/web that referenced this pull request Jun 14, 2026
1. Resource model: add `immutable` boolean field

2. Indicators (useResourceIndicators.ts):
   - Frozen file: snowflake icon
   - Protected folder: shield-check icon

3. Context menu actions (useFileActionsImmutable.ts):
   - "Freeze file": POST /freeze with confirmation dialog (irreversible!)
   - "Protect folder": POST /protect
   - "Remove protection": DELETE /protect

4. Actions registered in useFileActions.ts for context menu

Depends on: OpenCloud Graph API freeze/protect/unprotect endpoints
(blocked by cs3org/cs3apis#275 - Gateway SetImmutable RPC)

@glpatcern glpatcern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, the external API is always the Gateway, I missed that the endpoints had to be replicated here.

Yet, can you please move the definitions below L212, as these are StorageProvider-related endpoints and don't stand on their own?

Follow-up to cs3org#272 which added SetImmutable/UnsetImmutable
to the StorageProvider. This exposes the same RPCs on the Gateway so
that clients (like the Graph API in OpenCloud) can call them through
the gateway without needing direct StorageProvider access.

- SetImmutable: freeze files (irreversible) or protect containers (reversible)
- UnsetImmutable: remove protection from containers (frozen files stay frozen)
@flash7777 flash7777 force-pushed the feat/gateway-immutable-rpc branch from 8ed043f to d6b7fea Compare June 15, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants