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

Method userCount

internal/server/server.go:3562–3569  ·  view source on GitHub ↗

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 —

()

Source from the content-addressed store, hash-verified

3560// when it answers zero WITHOUT an error: a count that cannot be read is not
3561// an empty instance.
3562func (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
3571func (s *Server) visibleCollectionIDs(r *http.Request, workspaceID string) ([]string, error) {
3572 if s.visibleCollectionIDsFault != nil {

Callers 7

authorizeCollabAccessMethod · 0.95
handleListWorkspacesMethod · 0.95
CSRFProtectMethod · 0.95
RequireAuthMethod · 0.95
beginWorkspaceMintMethod · 0.95

Calls 1

UserCountMethod · 0.80

Tested by

no test coverage detected