Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update resource pool feature identifiers to infrastructure-specific #718

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Guddetisandeep
Copy link

@Guddetisandeep Guddetisandeep commented Feb 19, 2024

Comment on lines 16 to 14
FEATURE_MAPPING_CREATE = {
"resource_pool_infra" => {:name => "Infrastructure Resource Pools", :description => "Access Everything under Infrastructure Resource Pools", :feature_type => "node"},
"resource_pool_infra_view" => {:name => "View", :description => "Display Lists of Infrastructure Resource Pools", :feature_type => "view", :parent => "resource_pool_infra"},
"resource_pool_infra_show_list" => {:name => "List", :description => "Display Lists of Infrastructure Resource Pools", :feature_type => "view", :parent => "resource_pool_infra_view"},
"resource_pool_infra_show" => {:name => "Show", :description => "Display Individual Infrastructure Resource Pools", :feature_type => "view", :parent => "resource_pool_infra_view"},
"resource_pool_infra_control" => {:name => "Operate", :description => "Perform Operations on Infrastructure Resource Pools", :feature_type => "control", :parent => "resource_pool_infra"},
"resource_pool_infra_tag" => {:name => "Edit Tags", :description => "Edit Tags of Infrastructure Resource Pools", :feature_type => "control", :parent => "resource_pool_infra_control"},
"resource_pool_infra_protect" => {:name => "Manage Policies", :description => "Manage Policies of Infrastructure Resource Pools", :feature_type => "control", :parent => "resource_pool_infra_control"},
"resource_pool_infra_admin" => {:name => "Modify", :description => "Modify Infrastructure Resource Pools", :feature_type => "admin", :parent => "resource_pool_infra"},
"resource_pool_infra_delete" => {:name => "Remove", :description => "Remove Infrastructure Resource Pools", :feature_type => "admin", :parent => "resource_pool_infra_admin"}
}.freeze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Guddetisandeep you don't need to create the new features in this PR, that will be done when we seed the database. The only reason we need schema migration for existing product features is because users might have used the existing records for user/group permissions already and we can't just delete them.

Comment on lines 4 to 14
FEATURE_MAPPING_UPDATE = {
'resource_pool' => 'resource_pool_cloud',
'resource_pool_view' => 'resource_pool_cloud_view',
'resource_pool_show_list' => 'resource_pool_cloud_show_list',
'resource_pool_show' => 'resource_pool_cloud_show',
'resource_pool_control' => 'resource_pool_cloud_control',
'resource_pool_tag' => 'resource_pool_cloud_tag',
'resource_pool_protect' => 'resource_pool_cloud_protect',
'resource_pool_admin' => 'resource_pool_cloud_admin',
'resource_pool_delete' => 'resource_pool_cloud_delete'
}.freeze
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Guddetisandeep since the existing product feature was for infrastructure providers we should update the existing records to _infra not _cloud

@Guddetisandeep Guddetisandeep force-pushed the update_resource_pool_identifiers branch from f52eb46 to 81dcc8b Compare May 16, 2024 14:50
@miq-bot
Copy link
Member

miq-bot commented May 16, 2024

Checked commit Guddetisandeep@81dcc8b with ruby 2.7.8, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
2 files checked, 0 offenses detected
Everything looks fine. 🍰

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants