Skip to content

Commit

Permalink
Merge pull request #8927 from GilbertCherrie/fix_service_catalog_perm…
Browse files Browse the repository at this point in the history
…ission_errors

Fixed service catalog permission errors
  • Loading branch information
Fryguy authored Sep 28, 2023
2 parents f91fdac + 487b85b commit 990349c
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/controllers/catalog_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ def x_show
@sb[:action] = nil
@explorer = true
if x_active_tree == :stcat_tree
assert_privileges("catalog_items_view")
assert_privileges("st_catalog_view")

if params[:rec_id]
# link to Catalog Item clicked on catalog summary screen
Expand All @@ -406,12 +406,17 @@ def x_show
else
@record = ServiceTemplateCatalog.find(params[:id])
end
elsif x_active_tree == :sandt_tree
assert_privileges("catalog_items_view")

identify_catalog(params[:id])
@record ||= ServiceTemplateCatalog.find(params[:id])
elsif x_active_tree == :ot_tree
assert_privileges("orchestration_templates_view")

@record ||= OrchestrationTemplate.find(params[:id])
else
assert_privileges("st_catalog_view")
assert_privileges("svc_catalog_provision", "svc_catalog_archive", "svc_catalog_unarchive")

identify_catalog(params[:id])
@record ||= ServiceTemplateCatalog.find(params[:id])
Expand Down

0 comments on commit 990349c

Please sign in to comment.