blob: f195c3e88f9bc97b0793f78bfecdd1144ff0b1e7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# frozen_string_literal: true
module Ci
module Runners
module RunnerCreationStrategies
class InstanceRunnerStrategy
attr_accessor :user, :type, :params
def initialize(user:, type:, params:)
@user = user
@type = type
@params = params
end
def normalize_params
params[:runner_type] = :instance_type
end
def validate_params
true
end
def authorized_user?
user.present? && user.can?(:create_instance_runners)
end
end
end
end
end
|