summaryrefslogtreecommitdiff
path: root/app/services/protected_tags/update_service.rb
blob: 8a2419efd7bc9c293ddcaf37fdf2746d2a52089c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
module ProtectedTags
  class UpdateService < BaseService
    attr_reader :protected_tag

    def execute(protected_tag)
      raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)

      @protected_tag = protected_tag
      @protected_tag.update(params)
      @protected_tag
    end
  end
end