MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / isCollectionVisible

Function isCollectionVisible

internal/server/server.go:2254–2264  ·  view source on GitHub ↗

isCollectionVisible checks if a collection ID is in the visible set. If visibleIDs is nil, all collections are visible.

(collectionID string, visibleIDs []string)

Source from the content-addressed store, hash-verified

2252// isCollectionVisible checks if a collection ID is in the visible set.
2253// If visibleIDs is nil, all collections are visible.
2254func isCollectionVisible(collectionID string, visibleIDs []string) bool {
2255 if visibleIDs == nil {
2256 return true
2257 }
2258 for _, id := range visibleIDs {
2259 if id == collectionID {
2260 return true
2261 }
2262 }
2263 return false
2264}
2265
2266// filterUserGrantsForCaller narrows collGrants/itemGrants — the TARGET
2267// user's grants, already loaded by the caller — down to what the CALLER can

Callers 15

checkItemVisibleMethod · 0.85
handleGetItemLinksMethod · 0.85
handleDeleteItemLinkMethod · 0.85
handleListCollectionsMethod · 0.85
handleGetCollectionMethod · 0.85
enrichItemsWithParentMethod · 0.85
enrichItemForResponseMethod · 0.85
deriveItemClosureMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected