update_context.rb 303 Bytes
Newer Older
1
2
3
module Projects
  class UpdateContext < BaseContext
    def execute(role = :default)
4
      params[:project].delete(:namespace_id)
5
6
7
8
9
      params[:project].delete(:public) unless can?(current_user, :change_public_mode, project)
      project.update_attributes(params[:project], as: role)
    end
  end
end