```ruby
class Milestone < ActiveRecord::Base

  hobo_model # Don't put anything above this

  fields do
    name :string
    date :date
    background_color :string
    color         :string, :default => '#000000'
    timestamps
  end

  belongs_to :project
  has_many :items

  set_default_order "date DESC"

  # --- Permissions --- #

  def create_permitted?
    acting_user.administrator?
  end

  def update_permitted?
    acting_user.administrator?
  end

  def destroy_permitted?
    acting_user.administrator?
  end

  def view_permitted?(field)
    true
  end

end
```

Change the Milestone model to use project based permissions
user
```ruby
class Milestone < ActiveRecord::Base

  hobo_model # Don't put anything above this

  fields do
    name :string
    date :date
    background_color :string
    color         :string, :default => '#000000'
    timestamps
  end

  belongs_to :project
  has_many :items

  set_default_order "date DESC"

  # --- Permissions --- #

  def create_permitted?
    logger.debug("Milestone#create_permitted? #{ProjectMember.memberships.inspect} project_id: #{project_id}")
    ProjectMember.memberships.include?(project_id)
  end

  def update_permitted?
    logger.debug("Milestone#update_permitted? #{ProjectMember.memberships.inspect} project_id: #{project_id}")
    ProjectMember.memberships.include?(project_id)
  end

  def destroy_permitted?
    ProjectMember.memberships.include?(project_id)
  end

  def view_permitted?(field)
    logger.debug("Milestone#view_permitted? #{ProjectMember.view_memberships.inspect} project_id: #{project_id}")
    ProjectMember.view_memberships.include?(project_id)
  end

end
```
assistant