katello 3.17.3 → 3.18.0.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of katello might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/controllers/katello/api/registry/registry_proxies_controller.rb +38 -21
- data/app/controllers/katello/api/rhsm/candlepin_proxies_controller.rb +3 -1
- data/app/controllers/katello/api/v2/activation_keys_controller.rb +10 -15
- data/app/controllers/katello/api/v2/api_controller.rb +2 -1
- data/app/controllers/katello/api/v2/content_credentials_controller.rb +1 -8
- data/app/controllers/katello/api/v2/content_view_components_controller.rb +31 -14
- data/app/controllers/katello/api/v2/content_view_repositories_controller.rb +1 -0
- data/app/controllers/katello/api/v2/content_view_versions_controller.rb +65 -36
- data/app/controllers/katello/api/v2/content_views_controller.rb +27 -25
- data/app/controllers/katello/api/v2/environments_controller.rb +8 -8
- data/app/controllers/katello/api/v2/gpg_keys_controller.rb +5 -5
- data/app/controllers/katello/api/v2/host_collections_controller.rb +19 -16
- data/app/controllers/katello/api/v2/hosts_bulk_actions_controller.rb +17 -0
- data/app/controllers/katello/api/v2/repositories_bulk_actions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/repositories_controller.rb +8 -5
- data/app/controllers/katello/api/v2/subscriptions_controller.rb +1 -1
- data/app/controllers/katello/api/v2/sync_plans_controller.rb +8 -9
- data/app/controllers/katello/api/v2/upstream_subscriptions_controller.rb +9 -2
- data/app/controllers/katello/concerns/api/v2/authorization.rb +9 -5
- data/app/controllers/katello/concerns/api/v2/registration_controller_extensions.rb +21 -0
- data/app/controllers/katello/concerns/api/v2/repository_content_controller.rb +1 -1
- data/app/controllers/katello/concerns/organizations_controller_extensions.rb +2 -1
- data/app/helpers/katello/katello_urls_helper.rb +5 -2
- data/app/lib/actions/candlepin/product/content_create.rb +2 -0
- data/app/lib/actions/candlepin/product/content_update.rb +2 -0
- data/app/lib/actions/katello/applicability/hosts/bulk_generate.rb +2 -6
- data/app/lib/actions/katello/capsule_content/sync_capsule.rb +2 -6
- data/app/lib/actions/katello/content_view/publish.rb +3 -4
- data/app/lib/actions/katello/content_view_version/import.rb +4 -3
- data/app/lib/actions/katello/content_view_version/incremental_update.rb +18 -3
- data/app/lib/actions/katello/host/update_system_purpose.rb +31 -0
- data/app/lib/actions/katello/organization/manifest_delete.rb +0 -1
- data/app/lib/actions/katello/organization/manifest_import.rb +0 -1
- data/app/lib/actions/katello/organization/manifest_refresh.rb +0 -1
- data/app/lib/actions/katello/product/content_create.rb +7 -6
- data/app/lib/actions/katello/repository/filtered_index_content.rb +10 -1
- data/app/lib/actions/katello/repository/import_upload.rb +2 -1
- data/app/lib/actions/katello/repository/update.rb +4 -1
- data/app/lib/actions/pulp3/abstract_async_task.rb +0 -1
- data/app/lib/actions/pulp3/content_view/delete_repository_references.rb +1 -1
- data/app/lib/actions/pulp3/content_view_version/create_importer.rb +7 -3
- data/app/lib/actions/pulp3/content_view_version/export.rb +2 -1
- data/app/lib/actions/pulp3/content_view_version/import.rb +7 -3
- data/app/lib/actions/pulp3/orchestration/content_view_version/export.rb +15 -10
- data/app/lib/actions/pulp3/orchestration/content_view_version/import.rb +16 -10
- data/app/lib/actions/pulp3/repository/commit_upload.rb +2 -1
- data/app/lib/actions/pulp3/repository/delete.rb +1 -1
- data/app/lib/actions/pulp3/repository/save_artifact.rb +1 -1
- data/app/lib/katello/resources/candlepin/consumer.rb +2 -2
- data/app/lib/katello/resources/candlepin/owner.rb +5 -0
- data/app/lib/katello/resources/candlepin/upstream_consumer.rb +6 -0
- data/app/lib/katello/resources/registry.rb +3 -3
- data/app/models/katello/authorization/activation_key.rb +4 -0
- data/app/models/katello/authorization/content_view.rb +13 -0
- data/app/models/katello/authorization/content_view_component.rb +15 -0
- data/app/models/katello/authorization/gpg_key.rb +12 -4
- data/app/models/katello/authorization/lifecycle_environment.rb +8 -0
- data/app/models/katello/authorization/sync_plan.rb +16 -0
- data/app/models/katello/concerns/organization_extensions.rb +4 -5
- data/app/models/katello/concerns/redhat_extensions.rb +2 -2
- data/app/models/katello/concerns/smart_proxy_extensions.rb +1 -3
- data/app/models/katello/content_view_component.rb +2 -0
- data/app/models/katello/content_view_version_export_history.rb +2 -0
- data/app/models/katello/glue/candlepin/pool.rb +9 -14
- data/app/models/katello/glue/pulp/repo.rb +8 -0
- data/app/models/katello/gpg_key.rb +1 -1
- data/app/models/katello/root_repository.rb +26 -1
- data/app/services/katello/applicability/applicable_content_helper.rb +1 -12
- data/app/services/katello/candlepin/event_handler.rb +2 -0
- data/app/services/katello/candlepin/message_handler.rb +34 -0
- data/app/services/katello/candlepin/upstream_consumer.rb +28 -0
- data/app/services/katello/host_status_manager.rb +9 -0
- data/app/services/katello/pulp3/api/apt.rb +57 -0
- data/app/services/katello/pulp3/api/core.rb +8 -0
- data/app/services/katello/pulp3/content_view_version/export.rb +4 -3
- data/app/services/katello/pulp3/content_view_version/import.rb +5 -15
- data/app/services/katello/pulp3/deb.rb +38 -0
- data/app/services/katello/pulp3/erratum.rb +1 -2
- data/app/services/katello/pulp3/pulp_content_unit.rb +5 -0
- data/app/services/katello/pulp3/repository/ansible_collection.rb +9 -0
- data/app/services/katello/pulp3/repository/apt.rb +63 -0
- data/app/services/katello/pulp3/repository/docker.rb +4 -0
- data/app/services/katello/pulp3/repository/yum.rb +2 -1
- data/app/services/katello/pulp3/repository.rb +11 -9
- data/app/services/katello/pulp3/repository_mirror.rb +9 -4
- data/app/services/katello/pulp3/task.rb +3 -3
- data/app/services/katello/pulp3/task_group.rb +0 -6
- data/app/views/dashboard/_subscription_widget.html.erb +0 -5
- data/app/views/katello/api/v2/content_view_version_export_histories/show.json.rabl +1 -1
- data/app/views/katello/api/v2/repositories/base.json.rabl +1 -1
- data/app/views/overrides/organizations/_index_row_override.html.erb +1 -1
- data/config/routes/api/v2.rb +2 -0
- data/config/routes/overrides.rb +1 -0
- data/db/migrate/20150930183738_migrate_content_hosts.rb +1 -1
- data/db/migrate/20200514092553_move_katello_fields_from_hostgroups.katello.rb +2 -5
- data/db/migrate/20201008204114_add_os_versions_to_katello_root_repositories.rb +5 -0
- data/db/migrate/20201012172713_remove_gpg_key_perms.rb +23 -0
- data/db/migrate/20201012192035_add_metadata_to_katello_content_view_version_export_history.rb +5 -0
- data/db/seeds.d/111-upgrade_tasks.rb +2 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/notification.service.js +1 -1
- data/engines/bastion/app/assets/javascripts/bastion/components/nutupane.factory.js +8 -13
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/common/views/katello-agent-notice.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/content-hosts-bulk-system-purpose-modal.controller.js +112 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/bulk/views/content-hosts-bulk-system-purpose-modal.html +78 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content/content-host-debs-installed.controller.js +2 -42
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-host-modal-helper.service.js +11 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/content-hosts.controller.js +5 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/content-hosts.html +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/content-hosts/views/register-client.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/host-collection-details.controller.js +4 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/host-collections/details/views/host-collection-info.html +6 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/hosts/host-bulk-action.factory.js +2 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/i18n/bastion_katello.pot +16 -14
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/bulk/products-bulk-advanced-sync-modal.controller.js +6 -7
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/repository-details-info.controller.js +168 -155
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/details/views/repository-info.html +17 -2
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/new-repository.controller.js +125 -113
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/new/views/new-repository.html +15 -3
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/products/details/repositories/os-versions.service.js +46 -0
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/subscriptions/views/content-access-mode-banner.html +1 -1
- data/engines/bastion_katello/app/assets/javascripts/bastion_katello/sync-plans/details/views/sync-plan-details.html +1 -1
- data/lib/katello/engine.rb +1 -0
- data/lib/katello/permission_creator.rb +68 -59
- data/lib/katello/permissions/host_permissions.rb +1 -0
- data/lib/katello/plugin.rb +4 -1
- data/lib/katello/repository_types/deb.rb +9 -1
- data/lib/katello/tasks/pulp3_content_switchover.rake +1 -3
- data/lib/katello/tasks/pulp3_migration_stats.rake +21 -0
- data/lib/katello/tasks/reports.rake +1 -4
- data/lib/katello/tasks/reset.rake +2 -1
- data/lib/katello/tasks/upgrades/3.18/add_cvv_export_history_metadata.rb +18 -0
- data/lib/katello/version.rb +1 -1
- data/locale/action_names.rb +54 -47
- data/locale/bn/katello.po +165 -26
- data/locale/cs/katello.po +164 -24
- data/locale/de/katello.po +165 -26
- data/locale/en/katello.po +164 -23
- data/locale/es/katello.po +165 -25
- data/locale/fr/katello.po +165 -25
- data/locale/gu/katello.po +165 -26
- data/locale/hi/katello.po +165 -26
- data/locale/it/katello.po +165 -25
- data/locale/ja/katello.po +165 -26
- data/locale/katello.pot +1036 -802
- data/locale/kn/katello.po +165 -26
- data/locale/ko/katello.po +165 -25
- data/locale/mr/katello.po +165 -26
- data/locale/or/katello.po +165 -26
- data/locale/pa/katello.po +165 -26
- data/locale/pt/katello.po +164 -23
- data/locale/pt_BR/katello.po +165 -25
- data/locale/ru/katello.po +165 -25
- data/locale/ta/katello.po +165 -26
- data/locale/te/katello.po +165 -26
- data/locale/zh_CN/katello.po +165 -25
- data/locale/zh_TW/katello.po +165 -26
- data/webpack/components/ActionableDetail.js +2 -1
- data/webpack/components/Search/Search.js +1 -1
- data/webpack/components/Table/MainTable.js +6 -2
- data/webpack/components/Table/TableWrapper.js +46 -9
- data/webpack/scenes/ContentViews/ContentViewSelectors.js +7 -3
- data/webpack/scenes/ContentViews/ContentViewsConstants.js +8 -0
- data/webpack/scenes/ContentViews/ContentViewsPage.js +2 -9
- data/webpack/scenes/ContentViews/Details/ContentViewDetailActions.js +25 -3
- data/webpack/scenes/ContentViews/Details/ContentViewDetailSelectors.js +14 -4
- data/webpack/scenes/ContentViews/Details/ContentViewDetails.js +2 -1
- data/webpack/scenes/ContentViews/Details/Repositories/ContentCounts.js +56 -0
- data/webpack/scenes/ContentViews/Details/Repositories/ContentViewRepositories.js +169 -0
- data/webpack/scenes/ContentViews/Details/Repositories/LastSync.js +47 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoAddedStatus.js +17 -0
- data/webpack/scenes/ContentViews/Details/Repositories/RepoIcon.js +23 -0
- data/webpack/scenes/ContentViews/Details/Repositories/SelectableDropdown.js +49 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.fixtures.json +154 -0
- data/webpack/scenes/ContentViews/Details/Repositories/__tests__/contentViewDetailRepos.test.js +131 -0
- data/webpack/scenes/ContentViews/Details/__tests__/contentViewDetail.test.js +3 -0
- data/webpack/scenes/ContentViews/Table/ContentViewsTable.js +4 -1
- data/webpack/scenes/ContentViews/__tests__/contentViewPage.test.js +2 -2
- data/webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js +16 -8
- data/webpack/scenes/Subscriptions/Manifest/ManifestActions.js +17 -0
- data/webpack/scenes/Subscriptions/Manifest/ManifestConstants.js +4 -0
- data/webpack/scenes/Subscriptions/Manifest/SimpleContentAccess.js +19 -2
- data/webpack/scenes/Subscriptions/Manifest/__tests__/SimpleContentAccess.test.js +9 -1
- data/webpack/scenes/Subscriptions/Manifest/index.js +2 -1
- data/webpack/scenes/Subscriptions/SubscriptionConstants.js +1 -1
- data/webpack/scenes/Subscriptions/SubscriptionReducer.js +3 -0
- data/webpack/scenes/Subscriptions/SubscriptionsPage.js +8 -2
- data/webpack/scenes/Subscriptions/SubscriptionsSelectors.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsPage.test.js +3 -0
- data/webpack/scenes/Subscriptions/__tests__/SubscriptionsSelectors.test.js +6 -0
- data/webpack/scenes/Subscriptions/__tests__/__snapshots__/SubscriptionsSelectors.test.js.snap +6 -0
- data/webpack/scenes/Subscriptions/components/SubscriptionsToolbar/SubscriptionsToolbar.js +1 -13
- metadata +69 -26
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
* @requires OstreeUpstreamSyncPolicy
|
|
18
18
|
* @requires Architecture
|
|
19
19
|
* @requires RepositoryTypesService
|
|
20
|
+
* @requires OSVersions
|
|
20
21
|
* @requires YumContentUnits
|
|
21
22
|
* #requires HttpProxyPolicy
|
|
22
23
|
*
|
|
@@ -24,118 +25,121 @@
|
|
|
24
25
|
* Controls the creation of an empty Repository object for use by sub-controllers.
|
|
25
26
|
*/
|
|
26
27
|
angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
27
|
-
['$scope', '$sce', 'Repository', 'Product', 'ContentCredential', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'YumContentUnits', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture', 'RepositoryTypesService', 'HttpProxy', 'HttpProxyPolicy',
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
28
|
+
['$scope', '$sce', 'Repository', 'Product', 'ContentCredential', 'FormUtils', 'translate', 'Notification', 'ApiErrorHandler', 'BastionConfig', 'Checksum', 'YumContentUnits', 'DownloadPolicy', 'OstreeUpstreamSyncPolicy', 'Architecture', 'RepositoryTypesService', 'HttpProxy', 'HttpProxyPolicy', 'OSVersions',
|
|
29
|
+
function ($scope, $sce, Repository, Product, ContentCredential, FormUtils, translate, Notification, ApiErrorHandler, BastionConfig, Checksum, YumContentUnits, DownloadPolicy, OstreeUpstreamSyncPolicy, Architecture, RepositoryTypesService, HttpProxy, HttpProxyPolicy, OSVersions) {
|
|
30
|
+
|
|
31
|
+
function success() {
|
|
32
|
+
Notification.setSuccessMessage(translate('Repository %s successfully created.').replace('%s', $scope.repository.name));
|
|
33
|
+
$scope.transitionTo('product.repositories', {productId: $scope.$stateParams.productId});
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function error(response) {
|
|
37
|
+
var foundError = false;
|
|
38
|
+
$scope.working = false;
|
|
39
|
+
|
|
40
|
+
angular.forEach($scope.repositoryForm, function (field) {
|
|
41
|
+
if ($scope.repositoryForm.hasOwnProperty(field) && field.hasOwnProperty('$modelValue')) {
|
|
42
|
+
field.$setValidity('server', true);
|
|
43
|
+
$scope.repositoryForm[field].$error.messages = [];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
angular.forEach(response.data.errors, function (errors, field) {
|
|
48
|
+
if ($scope.repositoryForm.hasOwnProperty(field)) {
|
|
49
|
+
foundError = true;
|
|
50
|
+
$scope.repositoryForm[field].$setValidity('server', false);
|
|
51
|
+
$scope.repositoryForm[field].$error.messages = errors;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
if (!foundError) {
|
|
56
|
+
Notification.setErrorMessage(response.data.displayMessage);
|
|
43
57
|
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$scope.page = {
|
|
61
|
+
error: false,
|
|
62
|
+
loading: true
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
$scope.repository = new Repository({'product_id': $scope.$stateParams.productId, unprotected: true,
|
|
66
|
+
'checksum_type': null, 'mirror_on_sync': true, 'verify_ssl_on_sync': true,
|
|
67
|
+
'download_policy': BastionConfig.defaultDownloadPolicy, 'arch': null,
|
|
68
|
+
'ostree_upstream_sync_policy': 'latest'});
|
|
69
|
+
|
|
70
|
+
$scope.product = Product.get({id: $scope.$stateParams.productId}, function () {
|
|
71
|
+
$scope.page.loading = false;
|
|
72
|
+
}, function (response) {
|
|
73
|
+
$scope.page.loading = false;
|
|
74
|
+
ApiErrorHandler.handleGETRequestErrors(response, $scope);
|
|
44
75
|
});
|
|
45
76
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
77
|
+
$scope.repositoryTypes = RepositoryTypesService.creatable();
|
|
78
|
+
$scope.repositoryTypes = _.sortBy($scope.repositoryTypes, 'name');
|
|
79
|
+
|
|
80
|
+
$scope.checksums = Checksum.checksums;
|
|
81
|
+
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
|
82
|
+
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
|
83
|
+
$scope.ignorableYumContentUnits = YumContentUnits.units;
|
|
84
|
+
|
|
85
|
+
$scope.$watch('repository.name', function () {
|
|
86
|
+
if ($scope.repositoryForm && $scope.repositoryForm.name) {
|
|
87
|
+
$scope.repositoryForm.name.$setValidity('server', true);
|
|
88
|
+
FormUtils.labelize($scope.repository);
|
|
51
89
|
}
|
|
52
90
|
});
|
|
53
91
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
$scope.repository = new Repository({'product_id': $scope.$stateParams.productId, unprotected: true,
|
|
65
|
-
'checksum_type': null, 'mirror_on_sync': true, 'verify_ssl_on_sync': true,
|
|
66
|
-
'download_policy': BastionConfig.defaultDownloadPolicy, 'arch': null,
|
|
67
|
-
'ostree_upstream_sync_policy': 'latest'});
|
|
68
|
-
|
|
69
|
-
$scope.product = Product.get({id: $scope.$stateParams.productId}, function () {
|
|
70
|
-
$scope.page.loading = false;
|
|
71
|
-
}, function (response) {
|
|
72
|
-
$scope.page.loading = false;
|
|
73
|
-
ApiErrorHandler.handleGETRequestErrors(response, $scope);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
$scope.repositoryTypes = RepositoryTypesService.creatable();
|
|
77
|
-
$scope.repositoryTypes = _.sortBy($scope.repositoryTypes, 'name');
|
|
78
|
-
|
|
79
|
-
$scope.checksums = Checksum.checksums;
|
|
80
|
-
$scope.downloadPolicies = DownloadPolicy.downloadPolicies;
|
|
81
|
-
$scope.ostreeUpstreamSyncPolicies = OstreeUpstreamSyncPolicy.syncPolicies;
|
|
82
|
-
$scope.ignorableYumContentUnits = YumContentUnits.units;
|
|
83
|
-
|
|
84
|
-
$scope.$watch('repository.name', function () {
|
|
85
|
-
if ($scope.repositoryForm && $scope.repositoryForm.name) {
|
|
86
|
-
$scope.repositoryForm.name.$setValidity('server', true);
|
|
87
|
-
FormUtils.labelize($scope.repository);
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
$scope.handleFiles = function (element) {
|
|
92
|
-
var reader = new FileReader();
|
|
93
|
-
reader.addEventListener("loadend", function() {
|
|
94
|
-
var data = reader.result;
|
|
95
|
-
/* eslint-disable camelcase */
|
|
96
|
-
$scope.repository.ansible_collection_requirements = data;
|
|
97
|
-
$scope.$apply();
|
|
98
|
-
});
|
|
99
|
-
reader.readAsText(element.files[0]);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
ContentCredential.queryUnpaged(function (contentCredentials) {
|
|
103
|
-
$scope.contentCredentials = contentCredentials.results;
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
Architecture.queryUnpaged(function (architecture) {
|
|
107
|
-
var results = architecture.results;
|
|
108
|
-
var noarch = {
|
|
109
|
-
id: 'noarch',
|
|
110
|
-
name: translate('Default'),
|
|
111
|
-
value: null
|
|
92
|
+
$scope.handleFiles = function (element) {
|
|
93
|
+
var reader = new FileReader();
|
|
94
|
+
reader.addEventListener("loadend", function() {
|
|
95
|
+
var data = reader.result;
|
|
96
|
+
/* eslint-disable camelcase */
|
|
97
|
+
$scope.repository.ansible_collection_requirements = data;
|
|
98
|
+
$scope.$apply();
|
|
99
|
+
});
|
|
100
|
+
reader.readAsText(element.files[0]);
|
|
112
101
|
};
|
|
113
|
-
|
|
114
|
-
|
|
102
|
+
|
|
103
|
+
ContentCredential.queryUnpaged(function (contentCredentials) {
|
|
104
|
+
$scope.contentCredentials = contentCredentials.results;
|
|
115
105
|
});
|
|
116
|
-
results.unshift(noarch);
|
|
117
|
-
$scope.architecture = results;
|
|
118
|
-
$scope.repository.arch = results[0].id;
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
$scope.save = function (repository) {
|
|
122
|
-
if (repository.content_type === 'ostree') {
|
|
123
|
-
repository.unprotected = false;
|
|
124
|
-
}
|
|
125
|
-
if (repository.content_type !== 'yum') {
|
|
126
|
-
repository['download_policy'] = '';
|
|
127
|
-
}
|
|
128
|
-
if (repository.arch === 'Default') {
|
|
129
|
-
repository.arch = null;
|
|
130
|
-
}
|
|
131
|
-
repository.$save(success, error);
|
|
132
|
-
};
|
|
133
106
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
107
|
+
Architecture.queryUnpaged(function (architecture) {
|
|
108
|
+
var results = architecture.results;
|
|
109
|
+
var noarch = {
|
|
110
|
+
id: 'noarch',
|
|
111
|
+
name: translate('No restriction'),
|
|
112
|
+
value: null
|
|
113
|
+
};
|
|
114
|
+
results.map(function(i) {
|
|
115
|
+
i.id = i.name;
|
|
116
|
+
});
|
|
117
|
+
results.unshift(noarch);
|
|
118
|
+
$scope.architecture = results;
|
|
119
|
+
$scope.repository.arch = results[0].id;
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
$scope.save = function (repository) {
|
|
123
|
+
if (repository.content_type === 'ostree') {
|
|
124
|
+
repository.unprotected = false;
|
|
125
|
+
}
|
|
126
|
+
if (repository.content_type === 'yum') {
|
|
127
|
+
repository.os_versions = $scope.osVersionsParam();
|
|
128
|
+
}
|
|
129
|
+
if (repository.content_type !== 'yum') {
|
|
130
|
+
repository['download_policy'] = '';
|
|
131
|
+
}
|
|
132
|
+
if (repository.arch === 'No restriction') {
|
|
133
|
+
repository.arch = null;
|
|
134
|
+
}
|
|
135
|
+
repository.$save(success, error);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
$scope.repository['http_proxy_policy'] = HttpProxyPolicy.policies[0].label;
|
|
139
|
+
$scope.policies = HttpProxyPolicy.policies;
|
|
140
|
+
$scope.proxies = [];
|
|
137
141
|
|
|
138
|
-
|
|
142
|
+
$scope.collectionURLPopover = $sce.trustAsHtml("You can sync collections utilizing just the url:<br/>" +
|
|
139
143
|
"<b>1. For all collections in Ansible Galaxy:</b><br/>" +
|
|
140
144
|
"https://galaxy.ansible.com/api/v2/collections <br/>" +
|
|
141
145
|
"<b>2. For specific collection with URL filtering:</b><br/>" +
|
|
@@ -143,18 +147,26 @@ angular.module('Bastion.repositories').controller('NewRepositoryController',
|
|
|
143
147
|
"<b>3. For specific collections with Requirements.yml:</b><br/>" +
|
|
144
148
|
"Use base URL https://galaxy.ansible.com/ and specify requirements.yml below to specify collections");
|
|
145
149
|
|
|
146
|
-
|
|
150
|
+
$scope.requirementPopover = $sce.trustAsHtml("To learn more about requirement.yml specification, visit <a href='https://docs.ansible.com/ansible/devel/dev_guide/collections_tech_preview.html#install-multiple-collections-with-a-requirements-file' target=\"_blank\">documentation </a>");
|
|
151
|
+
|
|
152
|
+
$scope.displayHttpProxyPolicyName = function (policy) {
|
|
153
|
+
return HttpProxyPolicy.displayHttpProxyPolicyName(policy);
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
$scope.displayHttpProxyName = function (proxyId) {
|
|
157
|
+
return HttpProxyPolicy.displayHttpProxyName($scope.proxies, proxyId);
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
HttpProxy.queryUnpaged(function (proxies) {
|
|
161
|
+
$scope.proxies = proxies.results;
|
|
162
|
+
});
|
|
147
163
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
};
|
|
164
|
+
$scope.osVersionsOptions = OSVersions.getOSVersionsOptions($scope.repository);
|
|
165
|
+
$scope.repository.os_versions = $scope.osVersionsOptions[0]; // ensure that No restriction is selected initially
|
|
151
166
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
167
|
+
$scope.osVersionsParam = function () {
|
|
168
|
+
return OSVersions.osVersionsParam($scope.repository.os_versions);
|
|
169
|
+
};
|
|
155
170
|
|
|
156
|
-
|
|
157
|
-
$scope.proxies = proxies.results;
|
|
158
|
-
});
|
|
159
|
-
}]
|
|
171
|
+
}]
|
|
160
172
|
);
|
|
@@ -50,10 +50,22 @@
|
|
|
50
50
|
ng-model="repository.arch"
|
|
51
51
|
ng-options="arch.id as arch.name for arch in architecture">
|
|
52
52
|
</select>
|
|
53
|
-
<p class="help-block" translate>
|
|
54
|
-
Choose <b>Default</b> to enable the repository for all architectures
|
|
55
|
-
</p>
|
|
56
53
|
</div>
|
|
54
|
+
|
|
55
|
+
<div
|
|
56
|
+
bst-form-group label="{{ 'Restrict to OS version' | translate }}"
|
|
57
|
+
ng-if="repository.content_type === 'yum'"
|
|
58
|
+
>
|
|
59
|
+
<select id="os_versions"
|
|
60
|
+
name="os_versions"
|
|
61
|
+
ng-model="repository.os_versions"
|
|
62
|
+
ng-options="tag as tag.name for tag in osVersionsOptions track by tag.id">
|
|
63
|
+
</select>
|
|
64
|
+
<p class="help-block" translate>
|
|
65
|
+
The repository will be enabled by default on content hosts with the selected OS version.
|
|
66
|
+
</p>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
57
69
|
</div>
|
|
58
70
|
<div ng-show="repository.content_type !== undefined">
|
|
59
71
|
<h4 translate> Sync Settings </h4>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
/**
|
|
3
|
+
* @ngdoc service
|
|
4
|
+
* @name Bastion.products.details.repositories.service:OSVersions
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Helper functions for repo osVersions.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
angular
|
|
11
|
+
.module('Bastion.repositories')
|
|
12
|
+
.service('OSVersions', function () {
|
|
13
|
+
|
|
14
|
+
this.getOSVersionsOptions = function () {
|
|
15
|
+
return [
|
|
16
|
+
{ name: 'No restriction', id: '' },
|
|
17
|
+
{ name: 'Red Hat Enterprise Linux 8 ', id: 'rhel-8' },
|
|
18
|
+
{ name: 'Red Hat Enterprise Linux 7 ', id: 'rhel-7' },
|
|
19
|
+
{ name: 'Red Hat Enterprise Linux 6 ', id: 'rhel-6' }
|
|
20
|
+
];
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
// return an array of OS versions
|
|
24
|
+
this.osVersionsParam = function (osVersion) {
|
|
25
|
+
var param = osVersion;
|
|
26
|
+
if (osVersion && osVersion.hasOwnProperty('id')) {
|
|
27
|
+
param = osVersion.id;
|
|
28
|
+
}
|
|
29
|
+
// exclude null, undefined, and ''
|
|
30
|
+
return [param].filter(function (el) {
|
|
31
|
+
return el && el !== '';
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// return the OS versions as comma-separated string
|
|
36
|
+
this.formatOSVersions = function (osVersionList) {
|
|
37
|
+
var individualVersions, versionStr;
|
|
38
|
+
individualVersions = this.osVersionsParam(osVersionList);
|
|
39
|
+
if (individualVersions) {
|
|
40
|
+
versionStr = individualVersions.join(",");
|
|
41
|
+
}
|
|
42
|
+
return versionStr;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
}
|
|
46
|
+
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<div id="content-access-mode-banner" bst-alert="info" ng-show="simpleContentAccessEnabled">
|
|
2
2
|
<span translate>
|
|
3
|
-
This organization has Simple Content Access enabled.
|
|
3
|
+
This organization has Simple Content Access enabled. Hosts are not required to have subscriptions attached to access repositories.
|
|
4
4
|
</span>
|
|
5
5
|
</div>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<nav data-block="item-actions" bst-feature-flag="custom_products">
|
|
17
17
|
<span select-action-dropdown>
|
|
18
18
|
<ul class="dropdown-menu dropdown-menu-right" uib-dropdown-menu role="menu">
|
|
19
|
-
<li role="menuitem" ng-hide="denied('
|
|
19
|
+
<li role="menuitem" ng-hide="denied('sync_sync_plans')">
|
|
20
20
|
<a ng-click="runSyncPlan()">
|
|
21
21
|
<span translate>Run Sync Plan</span>
|
|
22
22
|
</a>
|
data/lib/katello/engine.rb
CHANGED
|
@@ -216,6 +216,7 @@ module Katello
|
|
|
216
216
|
::Api::V2::HostsController.include Katello::Concerns::Api::V2::HostsControllerExtensions
|
|
217
217
|
::Api::V2::HostgroupsController.include Katello::Concerns::Api::V2::HostgroupsControllerExtensions
|
|
218
218
|
::Api::V2::SmartProxiesController.include Katello::Concerns::Api::V2::SmartProxiesControllerExtensions
|
|
219
|
+
::Api::V2::RegistrationController.prepend Katello::Concerns::Api::V2::RegistrationControllerExtensions
|
|
219
220
|
|
|
220
221
|
::HostsController.class_eval do
|
|
221
222
|
helper Katello::Concerns::HostsAndHostgroupsHelperExtensions
|
|
@@ -8,7 +8,6 @@ module Katello
|
|
|
8
8
|
activation_keys_permissions
|
|
9
9
|
capsule_content_permissions
|
|
10
10
|
content_view_permissions
|
|
11
|
-
gpg_key_permissions
|
|
12
11
|
content_credential_permissions
|
|
13
12
|
host_collections_permissions
|
|
14
13
|
lifecycle_environment_permissions
|
|
@@ -25,7 +24,8 @@ module Katello
|
|
|
25
24
|
'katello/api/v2/activation_keys' => [:index, :show, :available_host_collections, :available_releases,
|
|
26
25
|
:product_content, :auto_complete_search]
|
|
27
26
|
},
|
|
28
|
-
:resource_type => 'Katello::ActivationKey'
|
|
27
|
+
:resource_type => 'Katello::ActivationKey',
|
|
28
|
+
:finder_scope => :readable
|
|
29
29
|
@plugin.permission :create_activation_keys,
|
|
30
30
|
{
|
|
31
31
|
'katello/api/v2/activation_keys' => [:create, :copy]
|
|
@@ -37,12 +37,14 @@ module Katello
|
|
|
37
37
|
:add_subscriptions, :remove_subscriptions,
|
|
38
38
|
:add_host_collections, :remove_host_collections]
|
|
39
39
|
},
|
|
40
|
-
:resource_type => 'Katello::ActivationKey'
|
|
40
|
+
:resource_type => 'Katello::ActivationKey',
|
|
41
|
+
:finder_scope => :editable
|
|
41
42
|
@plugin.permission :destroy_activation_keys,
|
|
42
43
|
{
|
|
43
44
|
'katello/api/v2/activation_keys' => [:destroy]
|
|
44
45
|
},
|
|
45
|
-
:resource_type => 'Katello::ActivationKey'
|
|
46
|
+
:resource_type => 'Katello::ActivationKey',
|
|
47
|
+
:finder_scope => :deletable
|
|
46
48
|
end
|
|
47
49
|
|
|
48
50
|
def capsule_content_permissions
|
|
@@ -72,7 +74,7 @@ module Katello
|
|
|
72
74
|
'katello/api/v2/content_view_histories' => [:index, :auto_complete_search],
|
|
73
75
|
'katello/api/v2/content_view_puppet_modules' => [:index, :show, :auto_complete_search],
|
|
74
76
|
'katello/api/v2/content_view_repositories' => [:show_all],
|
|
75
|
-
'katello/api/v2/content_view_versions' => [:index, :show, :auto_complete_search, :export_histories],
|
|
77
|
+
'katello/api/v2/content_view_versions' => [:index, :show, :auto_complete_search, :export_histories, :export_api_status],
|
|
76
78
|
'katello/api/v2/content_view_components' => [:index, :show],
|
|
77
79
|
'katello/api/v2/packages' => [:index],
|
|
78
80
|
'katello/api/v2/package_groups' => [:index, :show, :auto_complete_search, :compare],
|
|
@@ -109,7 +111,8 @@ module Katello
|
|
|
109
111
|
:view_compare_puppet_modules,
|
|
110
112
|
:views]
|
|
111
113
|
},
|
|
112
|
-
:resource_type => 'Katello::ContentView'
|
|
114
|
+
:resource_type => 'Katello::ContentView',
|
|
115
|
+
:finder_scope => :readable
|
|
113
116
|
@plugin.permission :create_content_views,
|
|
114
117
|
{
|
|
115
118
|
'katello/api/v2/content_views' => [:create, :copy]
|
|
@@ -124,76 +127,65 @@ module Katello
|
|
|
124
127
|
'katello/api/v2/content_view_puppet_modules' => [:create, :update, :destroy],
|
|
125
128
|
'katello/api/v2/content_view_components' => [:add_components, :remove_components, :update]
|
|
126
129
|
},
|
|
127
|
-
:resource_type => 'Katello::ContentView'
|
|
130
|
+
:resource_type => 'Katello::ContentView',
|
|
131
|
+
:finder_scope => :editable
|
|
128
132
|
@plugin.permission :destroy_content_views,
|
|
129
133
|
{
|
|
130
134
|
'katello/api/v2/content_views' => [:destroy, :remove],
|
|
131
135
|
'katello/api/v2/content_view_versions' => [:destroy]
|
|
132
136
|
},
|
|
133
|
-
:resource_type => 'Katello::ContentView'
|
|
137
|
+
:resource_type => 'Katello::ContentView',
|
|
138
|
+
:finder_scope => :deletable
|
|
134
139
|
@plugin.permission :publish_content_views,
|
|
135
140
|
{
|
|
136
141
|
'katello/api/v2/content_views' => [:publish],
|
|
137
142
|
'katello/api/v2/content_view_versions' => [:incremental_update, :republish_repositories, :import]
|
|
138
143
|
},
|
|
139
|
-
:resource_type => 'Katello::ContentView'
|
|
144
|
+
:resource_type => 'Katello::ContentView',
|
|
145
|
+
:finder_scope => :publishable
|
|
140
146
|
@plugin.permission :promote_or_remove_content_views,
|
|
141
147
|
{
|
|
142
148
|
'katello/api/v2/content_view_versions' => [:promote],
|
|
143
149
|
'katello/api/v2/content_views' => [:remove_from_environment, :remove, :republish_repositories]
|
|
144
150
|
},
|
|
145
|
-
:resource_type => 'Katello::ContentView'
|
|
151
|
+
:resource_type => 'Katello::ContentView',
|
|
152
|
+
:finder_scope => :promotable_or_removable
|
|
146
153
|
@plugin.permission :export_content_views,
|
|
147
154
|
{
|
|
148
|
-
'katello/api/v2/content_view_versions' => [:export]
|
|
149
|
-
},
|
|
150
|
-
:resource_type => 'Katello::ContentView'
|
|
151
|
-
end
|
|
152
|
-
|
|
153
|
-
def gpg_key_permissions
|
|
154
|
-
@plugin.permission :view_gpg_keys,
|
|
155
|
-
{
|
|
156
|
-
'katello/api/v2/gpg_keys' => [:index, :show, :content, :auto_complete_search]
|
|
157
|
-
},
|
|
158
|
-
:resource_type => 'Katello::GpgKey'
|
|
159
|
-
@plugin.permission :create_gpg_keys,
|
|
160
|
-
{
|
|
161
|
-
'katello/api/v2/gpg_keys' => [:create]
|
|
162
|
-
},
|
|
163
|
-
:resource_type => 'Katello::GpgKey'
|
|
164
|
-
@plugin.permission :edit_gpg_keys,
|
|
165
|
-
{
|
|
166
|
-
'katello/api/v2/gpg_keys' => [:update, :set_content]
|
|
167
|
-
},
|
|
168
|
-
:resource_type => 'Katello::GpgKey'
|
|
169
|
-
@plugin.permission :destroy_gpg_keys,
|
|
170
|
-
{
|
|
171
|
-
'katello/api/v2/gpg_keys' => [:destroy]
|
|
155
|
+
'katello/api/v2/content_view_versions' => [:export, :export_histories, :export_api_status]
|
|
172
156
|
},
|
|
173
|
-
:resource_type => 'Katello::
|
|
157
|
+
:resource_type => 'Katello::ContentView',
|
|
158
|
+
:finder_scope => :exportable
|
|
174
159
|
end
|
|
175
160
|
|
|
176
161
|
def content_credential_permissions
|
|
177
162
|
@plugin.permission :view_content_credentials,
|
|
178
163
|
{
|
|
179
|
-
'katello/api/v2/content_credentials' => [:index, :show, :content, :auto_complete_search]
|
|
164
|
+
'katello/api/v2/content_credentials' => [:index, :show, :content, :auto_complete_search],
|
|
165
|
+
'katello/api/v2/gpg_keys' => [:index, :show, :content, :auto_complete_search]
|
|
180
166
|
},
|
|
181
|
-
:resource_type => 'Katello::GpgKey'
|
|
167
|
+
:resource_type => 'Katello::GpgKey',
|
|
168
|
+
:finder_scope => :readable
|
|
182
169
|
@plugin.permission :create_content_credentials,
|
|
183
170
|
{
|
|
184
|
-
'katello/api/v2/content_credentials' => [:create]
|
|
171
|
+
'katello/api/v2/content_credentials' => [:create],
|
|
172
|
+
'katello/api/v2/gpg_keys' => [:create]
|
|
185
173
|
},
|
|
186
174
|
:resource_type => 'Katello::GpgKey'
|
|
187
175
|
@plugin.permission :edit_content_credentials,
|
|
188
176
|
{
|
|
189
|
-
'katello/api/v2/content_credentials' => [:update, :set_content]
|
|
177
|
+
'katello/api/v2/content_credentials' => [:update, :set_content],
|
|
178
|
+
'katello/api/v2/gpg_keys' => [:update, :set_content]
|
|
190
179
|
},
|
|
191
|
-
:resource_type => 'Katello::GpgKey'
|
|
180
|
+
:resource_type => 'Katello::GpgKey',
|
|
181
|
+
:finder_scope => :editable
|
|
192
182
|
@plugin.permission :destroy_content_credentials,
|
|
193
183
|
{
|
|
194
|
-
'katello/api/v2/content_credentials' => [:destroy]
|
|
184
|
+
'katello/api/v2/content_credentials' => [:destroy],
|
|
185
|
+
'katello/api/v2/gpg_keys' => [:destroy]
|
|
195
186
|
},
|
|
196
|
-
:resource_type => 'Katello::GpgKey'
|
|
187
|
+
:resource_type => 'Katello::GpgKey',
|
|
188
|
+
:finder_scope => :deletable
|
|
197
189
|
end
|
|
198
190
|
|
|
199
191
|
def host_collections_permissions
|
|
@@ -201,22 +193,26 @@ module Katello
|
|
|
201
193
|
{
|
|
202
194
|
'katello/api/v2/host_collections' => [:index, :show, :auto_complete_search]
|
|
203
195
|
},
|
|
204
|
-
:resource_type => 'Katello::HostCollection'
|
|
196
|
+
:resource_type => 'Katello::HostCollection',
|
|
197
|
+
:finder_scope => :readable
|
|
205
198
|
@plugin.permission :create_host_collections,
|
|
206
199
|
{
|
|
207
200
|
'katello/api/v2/host_collections' => [:create, :copy]
|
|
208
201
|
},
|
|
209
|
-
:resource_type => 'Katello::HostCollection'
|
|
202
|
+
:resource_type => 'Katello::HostCollection',
|
|
203
|
+
:finder_scope => :creatable
|
|
210
204
|
@plugin.permission :edit_host_collections,
|
|
211
205
|
{
|
|
212
206
|
'katello/api/v2/host_collections' => [:update, :add_hosts, :remove_hosts]
|
|
213
207
|
},
|
|
214
|
-
:resource_type => 'Katello::HostCollection'
|
|
208
|
+
:resource_type => 'Katello::HostCollection',
|
|
209
|
+
:finder_scope => :editable
|
|
215
210
|
@plugin.permission :destroy_host_collections,
|
|
216
211
|
{
|
|
217
212
|
'katello/api/v2/host_collections' => [:destroy]
|
|
218
213
|
},
|
|
219
|
-
:resource_type => 'Katello::HostCollection'
|
|
214
|
+
:resource_type => 'Katello::HostCollection',
|
|
215
|
+
:finder_scope => :deletable
|
|
220
216
|
end
|
|
221
217
|
|
|
222
218
|
def lifecycle_environment_permissions
|
|
@@ -225,26 +221,30 @@ module Katello
|
|
|
225
221
|
'katello/api/v2/environments' => [:index, :show, :paths, :repositories, :auto_complete_search],
|
|
226
222
|
'katello/api/rhsm/candlepin_proxies' => [:rhsm_index]
|
|
227
223
|
},
|
|
228
|
-
:resource_type => 'Katello::KTEnvironment'
|
|
224
|
+
:resource_type => 'Katello::KTEnvironment',
|
|
225
|
+
:finder_scope => :readable
|
|
229
226
|
@plugin.permission :create_lifecycle_environments,
|
|
230
227
|
{
|
|
231
228
|
'katello/api/v2/environments' => [:create]
|
|
232
229
|
},
|
|
233
|
-
:resource_type => 'Katello::KTEnvironment'
|
|
230
|
+
:resource_type => 'Katello::KTEnvironment',
|
|
231
|
+
:finder_scope => :creatable
|
|
234
232
|
@plugin.permission :edit_lifecycle_environments,
|
|
235
233
|
{
|
|
236
234
|
'katello/api/v2/environments' => [:update]
|
|
237
235
|
},
|
|
238
|
-
:resource_type => 'Katello::KTEnvironment'
|
|
236
|
+
:resource_type => 'Katello::KTEnvironment',
|
|
237
|
+
:finder_scope => :editable
|
|
239
238
|
@plugin.permission :destroy_lifecycle_environments,
|
|
240
239
|
{
|
|
241
240
|
'katello/api/v2/environments' => [:destroy]
|
|
242
241
|
},
|
|
243
|
-
:resource_type => 'Katello::KTEnvironment'
|
|
244
|
-
|
|
242
|
+
:resource_type => 'Katello::KTEnvironment',
|
|
243
|
+
:finder_scope => :deletable
|
|
245
244
|
@plugin.permission :promote_or_remove_content_views_to_environments,
|
|
246
245
|
{},
|
|
247
|
-
:resource_type => 'Katello::KTEnvironment'
|
|
246
|
+
:resource_type => 'Katello::KTEnvironment',
|
|
247
|
+
:finder_scope => :promotable
|
|
248
248
|
end
|
|
249
249
|
|
|
250
250
|
def product_permissions # rubocop:disable Metrics/MethodLength
|
|
@@ -329,7 +329,6 @@ module Katello
|
|
|
329
329
|
'katello/api/v2/products_bulk_actions' => [:sync_products],
|
|
330
330
|
'katello/api/v2/repositories_bulk_actions' => [:sync_repositories],
|
|
331
331
|
'katello/api/v2/sync' => [:index],
|
|
332
|
-
'katello/api/v2/sync_plans' => [:sync],
|
|
333
332
|
'katello/sync_management' => [:index, :sync_status, :product_status, :sync, :destroy]
|
|
334
333
|
},
|
|
335
334
|
:resource_type => 'Katello::Product',
|
|
@@ -372,33 +371,43 @@ module Katello
|
|
|
372
371
|
:resource_type => 'Katello::Subscription'
|
|
373
372
|
@plugin.permission :manage_subscription_allocations,
|
|
374
373
|
{
|
|
375
|
-
'katello/api/v2/upstream_subscriptions' => [:index, :create, :destroy, :update, :ping, :enable_simple_content_access, :disable_simple_content_access]
|
|
374
|
+
'katello/api/v2/upstream_subscriptions' => [:index, :create, :destroy, :update, :ping, :enable_simple_content_access, :disable_simple_content_access, :simple_content_access_eligible]
|
|
376
375
|
},
|
|
377
376
|
:resource_type => 'Katello::Subscription'
|
|
378
377
|
end
|
|
379
378
|
|
|
380
|
-
def sync_plan_permissions
|
|
379
|
+
def sync_plan_permissions # rubocop:disable Metrics/MethodLength
|
|
381
380
|
@plugin.permission :view_sync_plans,
|
|
382
381
|
{
|
|
383
382
|
'katello/api/v2/sync_plans' => [:index, :show, :add_products, :remove_products, :available_products, :auto_complete_search],
|
|
384
383
|
'katello/api/v2/products' => [:index]
|
|
385
384
|
},
|
|
386
|
-
:resource_type => 'Katello::SyncPlan'
|
|
385
|
+
:resource_type => 'Katello::SyncPlan',
|
|
386
|
+
:finder_scope => :readable
|
|
387
387
|
@plugin.permission :create_sync_plans,
|
|
388
388
|
{
|
|
389
389
|
'katello/api/v2/sync_plans' => [:create]
|
|
390
390
|
},
|
|
391
|
-
:resource_type => 'Katello::SyncPlan'
|
|
391
|
+
:resource_type => 'Katello::SyncPlan',
|
|
392
|
+
:finder_scope => :editable
|
|
392
393
|
@plugin.permission :edit_sync_plans,
|
|
393
394
|
{
|
|
394
395
|
'katello/api/v2/sync_plans' => [:update]
|
|
395
396
|
},
|
|
396
|
-
:resource_type => 'Katello::SyncPlan'
|
|
397
|
+
:resource_type => 'Katello::SyncPlan',
|
|
398
|
+
:finder_scope => :editable
|
|
397
399
|
@plugin.permission :destroy_sync_plans,
|
|
398
400
|
{
|
|
399
401
|
'katello/api/v2/sync_plans' => [:destroy]
|
|
400
402
|
},
|
|
401
|
-
:resource_type => 'Katello::SyncPlan'
|
|
403
|
+
:resource_type => 'Katello::SyncPlan',
|
|
404
|
+
:finder_scope => :deletable
|
|
405
|
+
@plugin.permission :sync_sync_plans,
|
|
406
|
+
{
|
|
407
|
+
'katello/api/v2/sync_plans' => [:sync]
|
|
408
|
+
},
|
|
409
|
+
:resource_type => 'Katello::SyncPlan',
|
|
410
|
+
:finder_scope => :syncable
|
|
402
411
|
end
|
|
403
412
|
|
|
404
413
|
def user_permissions
|