lib/katello/permission_creator.rb in katello-3.18.0.rc1 vs lib/katello/permission_creator.rb in katello-3.18.0.rc2
- old
+ new
@@ -290,27 +290,30 @@
:repo_packages,
:repo_errata,
:repo_puppet_modules,
:repo_compare_errata,
:repo_compare_packages,
- :repo_compare_puppet_modules]
+ :repo_compare_puppet_modules],
+ 'katello/api/v2/repository_sets' => [:index, :show, :available_repositories, :auto_complete_search]
},
:resource_type => 'Katello::Product',
:finder_scope => :readable
@plugin.permission :create_products,
{
'katello/api/v2/products' => [:create],
'katello/api/v2/package_groups' => [:create]
},
- :resource_type => 'Katello::Product'
+ :resource_type => 'Katello::Product',
+ :finder_scope => :editable
@plugin.permission :edit_products,
{
'katello/api/v2/products' => [:update],
'katello/api/v2/repositories' => [:create, :update, :remove_content, :import_uploads, :upload_content, :republish, :verify_checksum],
'katello/api/v2/products_bulk_actions' => [:update_sync_plans, :update_http_proxy, :verify_checksum_products],
'katello/api/v2/content_uploads' => [:create, :update, :destroy],
- 'katello/api/v2/organizations' => [:repo_discover, :cancel_repo_discover]
+ 'katello/api/v2/organizations' => [:repo_discover, :cancel_repo_discover],
+ 'katello/api/v2/repository_sets' => [:enable, :disable]
},
:resource_type => 'Katello::Product',
:finder_scope => :editable
@plugin.permission :destroy_products,
{
@@ -339,15 +342,14 @@
},
:resource_type => 'Katello::Product',
:finder_scope => :exportable
end
- def subscription_permissions # rubocop:disable Metrics/MethodLength
+ def subscription_permissions
@plugin.permission :view_subscriptions,
{
- 'katello/api/v2/subscriptions' => [:index, :show, :available, :manifest_history, :auto_complete_search],
- 'katello/api/v2/repository_sets' => [:index, :show, :available_repositories, :auto_complete_search]
+ 'katello/api/v2/subscriptions' => [:index, :show, :available, :manifest_history, :auto_complete_search]
},
:resource_type => 'Katello::Subscription'
@plugin.permission :attach_subscriptions,
{
'katello/api/v2/subscriptions' => [:create]
@@ -358,12 +360,11 @@
'katello/api/v2/subscriptions' => [:destroy]
},
:resource_type => 'Katello::Subscription'
@plugin.permission :import_manifest,
{
- 'katello/api/v2/subscriptions' => [:upload, :refresh_manifest],
- 'katello/api/v2/repository_sets' => [:enable, :disable]
+ 'katello/api/v2/subscriptions' => [:upload, :refresh_manifest]
},
:resource_type => 'Katello::Subscription'
@plugin.permission :delete_manifest,
{
'katello/api/v2/subscriptions' => [:delete_manifest]
@@ -374,14 +375,13 @@
'katello/api/v2/upstream_subscriptions' => [:index, :create, :destroy, :update, :ping, :enable_simple_content_access, :disable_simple_content_access, :simple_content_access_eligible]
},
:resource_type => 'Katello::Subscription'
end
- def sync_plan_permissions # rubocop:disable Metrics/MethodLength
+ def sync_plan_permissions
@plugin.permission :view_sync_plans,
{
- 'katello/api/v2/sync_plans' => [:index, :show, :add_products, :remove_products, :available_products, :auto_complete_search],
- 'katello/api/v2/products' => [:index]
+ 'katello/api/v2/sync_plans' => [:index, :show, :add_products, :remove_products, :available_products, :auto_complete_search]
},
:resource_type => 'Katello::SyncPlan',
:finder_scope => :readable
@plugin.permission :create_sync_plans,
{