pub async fn can_user_view_chapter(
conn: &mut PgConnection,
user_id: Option<Uuid>,
course_id: Option<Uuid>,
chapter_id: Option<Uuid>,
) -> Result<bool, ControllerError>
Expand description
Can be used to check whether user is allowed to view some course material. Chapters can be closed and and limited to certain people only.