  def set_project_type(project_type_name)
    check_write_access!

    mytype = DbProjectType.find_by_name(project_type_name)
    return false unless mytype
    self.type_id = mytype.id
    self.save!
    return true
  end
Weaknesses in this category are related to improper assignment or handling of permissions.