Commit f2467239 authored by James Fargher's avatar James Fargher

Merge branch 'vij-refactor-service-validation' into 'master'

Remove duplicate AdditionalPack validation

See merge request gitlab-org/gitlab!67514
parents 993c40a5 1a748a95
......@@ -28,15 +28,6 @@ module Ci
attr_reader :current_user, :namespace, :purchase_xid, :expires_at, :number_of_minutes
# rubocop: disable Cop/UserAdmin
def authorize_current_user!
# Using #admin? is discouraged as it will bypass admin mode authorisation checks,
# however those checks are not in place in our REST API yet, and this service is only
# going to be used by the API for admin-only actions
raise Gitlab::Access::AccessDeniedError unless current_user&.admin?
end
# rubocop: enable Cop/UserAdmin
# rubocop: disable CodeReuse/ActiveRecord
def additional_pack
@additional_pack ||= Ci::Minutes::AdditionalPack.find_or_initialize_by(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment