Files
ocis/services/graph/pkg/service/v0
Paul Faure f48fe015e1 fix(graph): avoid superfluous GetPublicShare call when deleting space permissions (#12122)
* fix(graph): avoid superfluous GetPublicShare call when deleting space permissions

DeletePermission unconditionally called getLinkPermissionResourceID as its
first step, even for space permissions on space roots.  This always failed
and logged a confusing "GetPublicShare failed" error.

Recognise space permission IDs (u:/g: prefixed) by their format via
spacePermissionIdToCS3Grantee before making any gateway calls.  Public
link lookups on space roots now only happen when the ID does not match
the space permission format.

Fixes: #12012

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Paul Faure <paul@faure.ca>

* docs: update changelog with PR number

Signed-off-by: Paul Faure <paul@faure.ca>

* refactor(graph): extract permission resolution helpers to reduce complexity

Split DeletePermission into resolveDeletePermission,
resolveSpaceRootPermission, and resolveItemPermission to bring
cognitive complexity under the SonarCloud limit of 15.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Paul Faure <paul@faure.ca>

---------

Signed-off-by: Paul Faure <paul@faure.ca>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 10:12:36 +02:00
..
2024-03-26 13:35:07 +01:00
2025-12-02 13:39:57 +01:00
2026-01-13 18:00:58 +01:00
2025-09-18 16:23:14 +02:00
2025-03-05 11:14:44 +01:00
2023-01-10 09:31:40 +01:00
2025-03-05 11:14:44 +01:00
2026-02-10 16:02:39 -05:00