Project

General

Profile

Download (835 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_pipeline / lib / foreman_pipeline / roles.rb @ a8170cc8

1
require 'foreman_pipeline/plugin'
2

    
3
viewer_permissions = [:view_jobs, :view_jenkins_instances, :view_jenkins_users,
4
                     :view_jenkins_projects, :view_jenkins_requests]
5
manager_permissions = [:view_jobs, :edit_jobs, :destroy_jobs, :create_jobs, 
6
                       :view_jenkins_instances, :edit_jenkins_instances, :destroy_jenkins_instances, :create_jenkins_instances,
7
                        :view_jenkins_users, :edit_jenkins_users, :destroy_jenkins_users, :create_jenkins_users,
8
                        :view_jenkins_projects,
9
                        :edit_jenkins_project_params, 
10
                        :view_jenkins_requests]
11

    
12
Foreman::Plugin.find(:foreman_pipeline).send :role, "Pipeline viewer", viewer_permissions
13
Foreman::Plugin.find(:foreman_pipeline).send :role, "Pipeline manager", manager_permissions