Class: Api::V2::RemoteExecutionFeaturesController
- Inherits:
-
BaseController
- Object
- BaseController
- Api::V2::RemoteExecutionFeaturesController
- Includes:
- Api::Version2, Foreman::Controller::Parameters::RemoteExecutionFeature
- Defined in:
- app/controllers/api/v2/remote_execution_features_controller.rb
Instance Method Summary collapse
Instance Method Details
#available_remote_execution_features ⇒ Object
34 35 36 37 38 |
# File 'app/controllers/api/v2/remote_execution_features_controller.rb', line 34 def available_remote_execution_features host = Host.find(params[:id]) @remote_execution_features = resource_scope @permissions = {:can_run_job => ((controller: :job_invocations, action: :create) && (!host.infrastructure_host? || User.current.can?(:execute_jobs_on_infrastructure_hosts))) } end |
#index ⇒ Object
10 11 12 |
# File 'app/controllers/api/v2/remote_execution_features_controller.rb', line 10 def index @remote_execution_features = resource_scope end |
#show ⇒ Object
16 17 |
# File 'app/controllers/api/v2/remote_execution_features_controller.rb', line 16 def show end |
#update ⇒ Object
28 29 30 |
# File 'app/controllers/api/v2/remote_execution_features_controller.rb', line 28 def update process_response @remote_execution_feature.update(remote_execution_feature_params) end |