  def set_maintenance_project(project)
    check_write_access!

    if project.class == Project
      self.maintenance_project_id = project.id
      self.save!
      return true
    elsif project.class == String
      prj = Project.find_by_name(project)
      if prj
        self.maintenance_project_id = prj.id
        self.save!
        return true
      end
    end
    return false
  end
Weaknesses in this category are related to improper assignment or handling of permissions.