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

Function isCollectionVisible

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

2652// isCollectionVisible checks if a collection ID is in the visible set.
2653// If visibleIDs is nil, all collections are visible.
2654func isCollectionVisible(collectionID string, visibleIDs []string) bool {
2655 if visibleIDs == nil {
2656 return true
2657 }
2658 for _, id := range visibleIDs {
2659 if id == collectionID {
2660 return true
2661 }
2662 }
2663 return false
2664}
2665
2666// filterUserGrantsForCaller narrows collGrants/itemGrants — the TARGET
2667// user's grants, already loaded by the caller — down to what the CALLER can

Callers 15

checkItemVisibleQMethod · 0.85
handleGetItemLinksMethod · 0.85
handleDeleteItemLinkMethod · 0.85
resolvePlaybookMethod · 0.85
handleListCollectionsMethod · 0.85
handleGetCollectionMethod · 0.85
enrichItemsWithParentMethod · 0.85
enrichItemForResponseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected