lib/katello/permission_creator.rb in katello-4.0.3 vs lib/katello/permission_creator.rb in katello-4.1.0.rc1

- old
+ new

@@ -21,11 +21,12 @@ def activation_keys_permissions @plugin.permission :view_activation_keys, { 'katello/activation_keys' => [:all, :index], 'katello/api/v2/activation_keys' => [:index, :show, :available_host_collections, :available_releases, - :product_content, :auto_complete_search] + :product_content, :auto_complete_search], + 'katello/api/v2/repository_sets' => [:index, :auto_complete_search] }, :resource_type => 'Katello::ActivationKey', :finder_scope => :readable @plugin.permission :create_activation_keys, { @@ -63,27 +64,23 @@ 'smart_proxies' => [:pulp_storage, :pulp_status, :show_with_content] }, :resource_type => "SmartProxy" end - def content_view_permissions # rubocop:disable Metrics/MethodLength + def content_view_permissions @plugin.permission :view_content_views, { - 'katello/api/v2/content_views' => [:index, :show, :available_puppet_modules, :auto_complete_search, - :available_puppet_module_names], + 'katello/api/v2/content_views' => [:index, :show, :auto_complete_search], 'katello/api/v2/content_view_filters' => [:index, :show, :auto_complete_search], - 'katello/api/v2/content_view_filter_rules' => [:index, :show], + 'katello/api/v2/content_view_filter_rules' => [:index, :show, :auto_complete_search], 'katello/api/v2/content_view_histories' => [:index, :auto_complete_search], - 'katello/api/v2/content_view_puppet_modules' => [:index, :show, :auto_complete_search], 'katello/api/v2/content_view_repositories' => [:show_all], 'katello/api/v2/content_view_versions' => [:index, :show, :auto_complete_search], - 'katello/api/v2/content_exports' => [:api_status], 'katello/api/v2/content_view_components' => [:index, :show], 'katello/api/v2/packages' => [:index], 'katello/api/v2/package_groups' => [:index, :show, :auto_complete_search, :compare], 'katello/api/v2/errata' => [:index, :show, :auto_complete_search, :compare, :available_errata], - 'katello/api/v2/puppet_modules' => [:index, :show, :auto_complete_search, :compare], 'katello/api/v2/module_streams' => [:index, :show, :auto_complete_search, :compare], 'katello/api/v2/ansible_collections' => [:index, :show, :auto_complete_search, :compare], 'katello/content_views' => [:auto_complete, :auto_complete_search], 'katello/errata' => [:short_details, :auto_complete], 'katello/packages' => [:details, :auto_complete], @@ -92,27 +89,21 @@ 'katello/content_search' => [:index, :products, :repos, :packages, :errata, - :puppet_modules, :packages_items, :errata_items, - :puppet_modules_items, :module_streams, :ansible_collections, :view_packages, - :view_puppet_modules, :repo_packages, :repo_errata, - :repo_puppet_modules, :repo_compare_errata, :repo_compare_packages, - :repo_compare_puppet_modules, :view_compare_errata, :view_compare_packages, - :view_compare_puppet_modules, :views] }, :resource_type => 'Katello::ContentView', :finder_scope => :readable @plugin.permission :create_content_views, @@ -124,11 +115,10 @@ { 'katello/api/v2/content_views' => [:update], 'katello/api/v2/content_view_versions' => [:update], 'katello/api/v2/content_view_filters' => [:create, :update, :destroy], 'katello/api/v2/content_view_filter_rules' => [:create, :update, :destroy], - 'katello/api/v2/content_view_puppet_modules' => [:create, :update, :destroy], 'katello/api/v2/content_view_components' => [:add_components, :remove_components, :update] }, :resource_type => 'Katello::ContentView', :finder_scope => :editable @plugin.permission :destroy_content_views, @@ -140,11 +130,11 @@ :finder_scope => :deletable @plugin.permission :publish_content_views, { 'katello/api/v2/content_views' => [:publish], 'katello/api/v2/content_view_versions' => [:incremental_update, :republish_repositories], - 'katello/api/v2/content_imports' => [:version] + 'katello/api/v2/content_imports' => [:version, :index] }, :resource_type => 'Katello::ContentView', :finder_scope => :publishable @plugin.permission :promote_or_remove_content_views, { @@ -154,11 +144,11 @@ :resource_type => 'Katello::ContentView', :finder_scope => :promotable_or_removable @plugin.permission :export_content_views, { 'katello/api/v2/content_view_versions' => [:export], - 'katello/api/v2/content_exports' => [:version, :index, :api_status], + 'katello/api/v2/content_exports' => [:version, :index], 'katello/api/v2/content_export_incrementals' => [:version] }, :resource_type => 'Katello::ContentView', :finder_scope => :exportable end @@ -250,11 +240,11 @@ {}, :resource_type => 'Katello::KTEnvironment', :finder_scope => :promotable end - def product_permissions # rubocop:disable Metrics/MethodLength + def product_permissions @plugin.permission :view_products, { 'katello/products' => [:auto_complete, :auto_complete_search], 'katello/api/v2/products' => [:index, :show, :auto_complete_search], 'katello/api/v2/repositories' => [:index, :show, :repository_types, :auto_complete_search, :cancel], @@ -271,35 +261,29 @@ :compare, :repositories], 'katello/api/v2/file_units' => [:index, :show, :auto_complete_search, :compare], 'katello/api/v2/ostree_branches' => [:index, :show, :auto_complete_search, :compare], 'katello/api/v2/errata' => [:index, :show, :auto_complete_search, :compare], - 'katello/api/v2/puppet_modules' => [:index, :show, :auto_complete_search, :compare], 'katello/api/v2/module_streams' => [:index, :show, :auto_complete_search, :compare, :auto_complete_name], 'katello/api/v2/ansible_collections' => [:index, :show, :auto_complete_search, :compare], 'katello/errata' => [:short_details, :auto_complete], 'katello/packages' => [:details, :auto_complete], - 'katello/puppet_modules' => [:show], 'katello/files' => [:auto_complete], 'katello/repositories' => [:auto_complete_library, :repository_types], 'katello/content_search' => [:index, :products, :repos, :packages, :errata, - :puppet_modules, :packages_items, :errata_items, - :puppet_modules_items, :module_streams, :ansible_collections, :repo_packages, :repo_errata, - :repo_puppet_modules, :repo_compare_errata, - :repo_compare_packages, - :repo_compare_puppet_modules], + :repo_compare_packages], 'katello/api/v2/repository_sets' => [:index, :show, :available_repositories, :auto_complete_search] }, :resource_type => 'Katello::Product', :finder_scope => :readable @plugin.permission :create_products, @@ -347,11 +331,11 @@ }, :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] }, :resource_type => 'Katello::Subscription' @@ -425,16 +409,16 @@ end def organization_permissions @plugin.permission :import_library_content, { - 'katello/api/v2/content_imports' => [:library] + 'katello/api/v2/content_imports' => [:library, :index] }, :resource_type => 'Organization' @plugin.permission :export_library_content, { - 'katello/api/v2/content_exports' => [:library], + 'katello/api/v2/content_exports' => [:library, :index], 'katello/api/v2/content_export_incrementals' => [:library] }, :resource_type => 'Organization' end end