isCollectionVisible checks if a collection ID is in the visible set. If visibleIDs is nil, all collections are visible.
(collectionID string, visibleIDs []string)
| 2652 | // isCollectionVisible checks if a collection ID is in the visible set. |
| 2653 | // If visibleIDs is nil, all collections are visible. |
| 2654 | func 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 |
no outgoing calls
no test coverage detected