app/models/user.rb
# Return whether user can edit notebooks in a group
Return whether user can edit notebooks in a group
Return whether user can edit notebooks in a group
def group_editor?(group_or_gid)
    if group_or_gid.is_a?(Group)
      groups_editor.include?(group_or_gid)
    else
      groups_editor.map(&:gid).include?(group_or_gid)
    end
  end
def group_editor? ( group_or_gid ) if group_or_gid . is_a? ( Group ) groups_editor . include? ( group_or_gid ) else groups_editor . map ( & :gid ) . include? ( group_or_gid ) end end
Return whether user can edit notebooks in a group
Return whether user can edit notebooks in a group
group_or_gid