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
|