app/models/user.rb
# Return whether user can edit the given notebook
Return whether user can edit the given notebook
Return whether user can edit the given notebook
def can_edit?(notebook, use_admin=false)
    return false unless notebook.custom_edit_check(self, use_admin)
    notebook.owner == self ||
      groups_editor.include?(notebook.owner) ||
      shares.include?(notebook) ||
      (use_admin && admin?)
  end
def can_edit? ( notebook , use_admin = false ) return false unless notebook . custom_edit_check ( self , use_admin ) notebook . owner == self || groups_editor . include? ( notebook . owner ) || shares . include? ( notebook ) || ( use_admin && admin? ) end
Return whether user can edit the given notebook
Return whether user can edit the given notebook
notebook
use_admin