docs(document): document scope-check bypass on getSummaryById
Clarify in the Javadoc that getSummaryById intentionally skips scope checks and tag-colour resolution. This is safe under the current single-tenant model and is explicitly used by JourneyItemService.append() to validate that a linked document exists before persisting a JourneyItem. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1007,9 +1007,10 @@ public class DocumentService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lean document lookup for embedding in JourneyItemView. Skips
|
* Lightweight summary lookup for internal use (e.g. journey item append validation).
|
||||||
* {@code tagService.resolveEffectiveColors} — ×N items per journey GET is wasted
|
* Intentionally skips scope checks and tag-colour resolution — safe only
|
||||||
* work that summary consumers never read. Called within a caller-provided transaction.
|
* under the current single-tenant model where all authenticated users share
|
||||||
|
* the same document scope. Called within a caller-provided transaction.
|
||||||
*/
|
*/
|
||||||
public Document getSummaryById(UUID id) {
|
public Document getSummaryById(UUID id) {
|
||||||
return documentRepository.findById(id)
|
return documentRepository.findById(id)
|
||||||
|
|||||||
Reference in New Issue
Block a user