update_service.rb 290 Bytes
Newer Older
1 2
# frozen_string_literal: true

3 4 5 6 7
module ProtectedTags
  class UpdateService < BaseService
    def execute(protected_tag)
      raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)

8 9
      protected_tag.update(params)
      protected_tag
10 11 12
    end
  end
end