Documentation
¶
Overview ¶
Package visibility decides who may see a course or a stream.
The rules take domain types and return a decision, so they can be tested without a gRPC context. The package has no database access on purpose: a rule that needs a query has outgrown being a rule.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Listed ¶
Listed reports whether a course belongs in a listing, such as the live courses on the start page. A nil user is anonymous.
func Reachable ¶
Reachable reports whether user may open a course by slug.
Not model.User.IsEligibleToWatchCourse, which answers almost the same question with different rules for signed-in users; unifying them is a behaviour change.
func StreamVisible ¶
StreamVisible reports whether one stream of a course may be shown to user. It assumes the course itself has already been cleared.
Types ¶
This section is empty.