gitlab-org--gitlab-foss/app/services/protected_tags/update_service.rb

13 lines
292 B
Ruby

# frozen_string_literal: true
module ProtectedTags
class UpdateService < ::BaseService
def execute(protected_tag)
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)
protected_tag.update(params)
protected_tag
end
end
end