visibleCollectionIDs returns the set of collection IDs the current user can see in the given workspace. Returns nil if the user has "all" access (no filtering needed), or a non-nil slice for "specific" access. Unauthenticated users (fresh install) always get nil (all access), as do platform admins —
()
| 3560 | // when it answers zero WITHOUT an error: a count that cannot be read is not |
| 3561 | // an empty instance. |
| 3562 | func (s *Server) userCount() (int, error) { |
| 3563 | if s.userCountFault != nil { |
| 3564 | if err := s.userCountFault(); err != nil { |
| 3565 | return 0, err |
| 3566 | } |
| 3567 | } |
| 3568 | return s.store.UserCount() |
| 3569 | } |
| 3570 | |
| 3571 | func (s *Server) visibleCollectionIDs(r *http.Request, workspaceID string) ([]string, error) { |
| 3572 | if s.visibleCollectionIDsFault != nil { |
no test coverage detected