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

Method canSeeChannelSince

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

Source from the content-addressed store, hash-verified

641}
642
643func (user *userImpl) canSeeChannelSince(channel string) (uint64, error) {
644 minSeq, err := user.roleImpl.canSeeChannelSince(channel)
645 if err != nil {
646 return 0, err
647 }
648 roles, err := user.GetRoles()
649 if err != nil {
650 return 0, err
651 }
652 for _, role := range roles {
653 seq, err := role.canSeeChannelSince(channel)
654 if err != nil {
655 return 0, err
656 }
657 if seq > 0 && (seq < minSeq || minSeq == 0) {
658 minSeq = seq
659 }
660 }
661 return minSeq, nil
662}
663
664func (user *userImpl) authorizeAllChannels(channels base.Set) error {
665 return authorizeAllChannels(user, channels)

Callers

nothing calls this directly

Calls 2

GetRolesMethod · 0.95
canSeeChannelSinceMethod · 0.65

Tested by

no test coverage detected