* 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>
Added the `spaceId` to the incoming shares. This is aligning the graph
API with the WebDAV API where the clients can use `spaceid` property.
This change allows clients to get the space ID directly instead of
having to parse the resource ID.
Build the event at the call site and pass it directly, removing
three parameters (removedTags, rid, sres) from the helper as
suggested in review.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Inline error check in publishTagsRemoved call (godre:S8193)
- Change FIXME to NOTE for intentional non-atomic rollback comment (go:S1134)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move the event publishing and rollback logic into a dedicated helper
method to bring UnassignTags below the SonarCloud cognitive complexity
threshold of 15.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Address review feedback: if the TagsRemoved event fails to publish,
attempt to restore the original tags metadata and return HTTP 500
instead of silently succeeding. This avoids leaving the system in
an inconsistent state where metadata is updated but the search
index is not notified.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The DELETE tags endpoint returned HTTP 400 with a misleading error
message ("no new tags in createtagsrequest or maximum reached") when
the requested tag was absent from the file's ArbitraryMetadata. This
made it impossible to clean up stale tags that exist in the search
index but not in the file metadata.
Change UnassignTags to:
- skip the SetArbitraryMetadata call when nothing was removed
- always publish the TagsRemoved event so the search index stays in sync
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: [OCISDEV-518] Added the graph endpointis alias
* Update changelog/unreleased/enhancement-add-graph-endpoint.md
Co-authored-by: Martin <github@diemattels.at>
---------
Co-authored-by: Martin <github@diemattels.at>