debian-mirror-gitlab/app/services/protected_tags/update_service.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
292 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2017-08-17 22:00:37 +05:30
module ProtectedTags
2022-02-05 19:09:49 +05:30
class UpdateService < ::BaseService
2017-08-17 22:00:37 +05:30
def execute(protected_tag)
raise Gitlab::Access::AccessDeniedError unless can?(current_user, :admin_project, project)
2022-02-05 19:09:49 +05:30
protected_tag.update(params)
2017-08-17 22:00:37 +05:30
protected_tag
end
end
end