Bug #32396
Permissions for import/export
Description
With auto create functionality importing things into a content view requires multiple high level permissions currently including product create/update, repo create/update, cv create/update along with import_content_views. Handling this wide array of permissions adds complexity to the code
Proposal:Change permissions needed to export and import content
- To import you need organization 'import_content'
- To export you need organization 'export_content'
Both are at org level so its amply clear to the user that its going to be creating stuff in the library that they have no control over.
Steps to address this proposal:
- Rename organization import_library_content to import_content
- Rename organization export_library_content to export_content
- Tweak the permissions at https://github.com/Katello/katello/blob/master/lib/katello/permission_creator.rb#L411 to include routes for 'version'
- Remove the export_content_views permission from https://github.com/Katello/katello/blob/master/lib/katello/permission_creator.rb#L146 and move its end points to the org perms.
- Create a migration to remove export_content_views permission from the database. Similar to
https://github.com/Katello/katello/blob/master/db/migrate/20201012172713_remove_gpg_key_perms.rb
- Scour through content_exports_controllers and content_import_controllers for permissions that need to be tweaked.
- Add a 'Content Importer' role that only include organization 'import_content' permission
- Add a 'Content Exporter' role that only include organization 'export_content' permission
Associated revisions
History
#1
Updated by James Jeffers about 1 year ago
- Triaged changed from No to Yes
#2
Updated by The Foreman Bot about 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/Katello/katello/pull/9354 added
#3
Updated by Jeremy Lenz 12 months ago
- Triaged changed from Yes to No
#5
Updated by The Foreman Bot 12 months ago
- Fixed in Releases Katello 4.2.0 added
#6
Updated by Lucy Fu 12 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset katello|69864057c2c55641dc1d9234fae323ee3d838eb8.
Fixes #32396 - Permissions for Import/Export (#9354)