app/models/user.rb
def can_read?(notebook, use_admin=false)
    return false unless notebook.custom_read_check(self, use_admin)
    notebook.public ||
      can_edit?(notebook, use_admin) ||
      groups.include?(notebook.owner) ||
      (use_admin && admin?)
  end
# Return whether user can view the given notebook
Return whether user can view the given notebook
Return whether user can view the given notebook
def can_read?(notebook, use_admin=false)
    return false unless notebook.custom_read_check(self, use_admin)
    notebook.public ||
      can_edit?(notebook, use_admin) ||
      groups.include?(notebook.owner) ||
      (use_admin && admin?)
  end
def can_read? ( notebook , use_admin = false ) return false unless notebook . custom_read_check ( self , use_admin ) notebook . public || can_edit? ( notebook , use_admin ) || groups . include? ( notebook . owner ) || ( use_admin && admin? ) end
Return whether user can view the given notebook
Return whether user can view the given notebook
notebook
use_admin