MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / canSeeChannel

Method canSeeChannel

auth/user.go:619–641  ·  view source on GitHub ↗
(channel string)

Source from the content-addressed store, hash-verified

617}
618
619func (user *userImpl) canSeeChannel(channel string) (bool, error) {
620 canSee, err := user.roleImpl.canSeeChannel(channel)
621 if err != nil {
622 return canSee, err
623 }
624 if canSee {
625 return true, nil
626 }
627 roles, err := user.GetRoles()
628 if err != nil {
629 return false, err
630 }
631 for _, role := range roles {
632 canSee, err := role.canSeeChannel(channel)
633 if err != nil {
634 return false, err
635 }
636 if canSee {
637 return true, nil
638 }
639 }
640 return false, nil
641}
642
643func (user *userImpl) canSeeChannelSince(channel string) (uint64, error) {
644 minSeq, err := user.roleImpl.canSeeChannelSince(channel)

Callers

nothing calls this directly

Calls 2

GetRolesMethod · 0.95
canSeeChannelMethod · 0.65

Tested by

no test coverage detected