Skip to content

Commit

Permalink
Add permission tests for foreman_scc_manager (#16892)
Browse files Browse the repository at this point in the history
  • Loading branch information
dosas authored Nov 13, 2024
1 parent c060290 commit 1e379f4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
13 changes: 13 additions & 0 deletions robottelo/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,19 @@
'lock_report_templates',
],
'Role': ['view_roles', 'create_roles', 'edit_roles', 'destroy_roles'],
'SccAccount': [
"delete_scc_accounts",
"edit_scc_accounts",
"new_scc_accounts",
"sync_scc_accounts",
"test_connection_scc_accounts",
"use_scc_accounts",
"view_scc_accounts",
],
'SccProduct': [
"subscribe_scc_products",
"view_scc_products",
],
'Setting': ['view_settings', 'edit_settings'],
'SmartProxy': [
'view_smart_proxies',
Expand Down
3 changes: 3 additions & 0 deletions tests/foreman/api/test_permission.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ def create_permissions(self, class_target_sat):
cls.permissions.pop('ForemanPuppet::HostClass')
cls.permissions.pop('ForemanPuppet::Puppetclass')
cls.permissions.pop('ForemanPuppet::PuppetclassLookupKey')
if 'rubygem-foreman_scc_manager' not in rpm_packages:
cls.permissions.pop('SccAccount')
cls.permissions.pop('SccProduct')

#: e.g. ['Architecture', 'Audit', 'AuthSourceLdap', …]
cls.permission_resource_types = list(cls.permissions.keys())
Expand Down

0 comments on commit 1e379f4

Please sign in to comment.