Project

General

Profile

Download (1.02 KB) Statistics
| Branch: | Tag: | Revision:

foreman_pipeline / lib / foreman_pipeline / permissions / jenkins_instance_permission.rb @ be52ca64

1
require 'foreman_pipeline/plugin'
2

    
3
Foreman::Plugin.find(:foreman_pipeline).security_block :jenkins_instances do
4
  permission :view_jenkins_instances,
5
              {
6
                'foreman_pipeline/jenkins_instances' => [:all, :index, :show],
7
                'foreman_pipeline/api/jenkins_instances' => [:index, :show],
8
              },
9
              :resource_type => 'ForemanPipeline::JenkinsInstance'
10
  permission :create_jenkins_instances,
11
              {
12
                'foreman_pipeline/api/jenkins_instances' => [:create],
13
              },
14
              :resource_type => 'ForemanPipeline::JenkinsInstance'
15
  permission :edit_jenkins_instances,
16
              {
17
                'foreman_pipeline/api/jenkins_instances' => [:update],
18
              },
19
              :resource_type => 'ForemanPipeline::JenkinsInstance'
20
  permission :destroy_jenkins_instances,
21
              {
22
                'foreman_pipeline/api/jenkins_instances' => [:destroy],
23
              },
24
              :resource_type => 'ForemanPipeline::JenkinsInstance'
25
end