lib/katello/permission_creator.rb in katello-3.18.0.rc2.1 vs lib/katello/permission_creator.rb in katello-3.18.0

- old
+ new

@@ -9,10 +9,11 @@ capsule_content_permissions content_view_permissions content_credential_permissions host_collections_permissions lifecycle_environment_permissions + organization_permissions product_permissions subscription_permissions sync_plan_permissions user_permissions end @@ -72,11 +73,12 @@ '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_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, :export_histories, :export_api_status], + '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], @@ -137,11 +139,12 @@ :resource_type => 'Katello::ContentView', :finder_scope => :deletable @plugin.permission :publish_content_views, { 'katello/api/v2/content_views' => [:publish], - 'katello/api/v2/content_view_versions' => [:incremental_update, :republish_repositories, :import] + 'katello/api/v2/content_view_versions' => [:incremental_update, :republish_repositories], + 'katello/api/v2/content_imports' => [:version] }, :resource_type => 'Katello::ContentView', :finder_scope => :publishable @plugin.permission :promote_or_remove_content_views, { @@ -150,11 +153,13 @@ }, :resource_type => 'Katello::ContentView', :finder_scope => :promotable_or_removable @plugin.permission :export_content_views, { - 'katello/api/v2/content_view_versions' => [:export, :export_histories, :export_api_status] + 'katello/api/v2/content_view_versions' => [:export], + 'katello/api/v2/content_exports' => [:version, :index, :api_status], + 'katello/api/v2/content_export_incrementals' => [:version] }, :resource_type => 'Katello::ContentView', :finder_scope => :exportable end @@ -414,8 +419,23 @@ @plugin.permission :my_organizations, { 'katello/api/rhsm/candlepin_proxies' => [:list_owners] }, :public => true + end + + def organization_permissions + @plugin.permission :import_library_content, + { + 'katello/api/v2/content_imports' => [:library] + }, + :resource_type => 'Organization' + + @plugin.permission :export_library_content, + { + 'katello/api/v2/content_exports' => [:library], + 'katello/api/v2/content_export_incrementals' => [:library] + }, + :resource_type => 'Organization' end end end