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

Function isCollectionVisible

internal/server/server.go:2331–2341  ·  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

2329// isCollectionVisible checks if a collection ID is in the visible set.
2330// If visibleIDs is nil, all collections are visible.
2331func isCollectionVisible(collectionID string, visibleIDs []string) bool {
2332 if visibleIDs == nil {
2333 return true
2334 }
2335 for _, id := range visibleIDs {
2336 if id == collectionID {
2337 return true
2338 }
2339 }
2340 return false
2341}
2342
2343// filterUserGrantsForCaller narrows collGrants/itemGrants — the TARGET
2344// 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