Skip to content

Commit 487b85b

Browse files
Fixed catalog permission errors
1 parent f91fdac commit 487b85b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

app/controllers/catalog_controller.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ def x_show
396396
@sb[:action] = nil
397397
@explorer = true
398398
if x_active_tree == :stcat_tree
399-
assert_privileges("catalog_items_view")
399+
assert_privileges("st_catalog_view")
400400

401401
if params[:rec_id]
402402
# link to Catalog Item clicked on catalog summary screen
@@ -406,12 +406,17 @@ def x_show
406406
else
407407
@record = ServiceTemplateCatalog.find(params[:id])
408408
end
409+
elsif x_active_tree == :sandt_tree
410+
assert_privileges("catalog_items_view")
411+
412+
identify_catalog(params[:id])
413+
@record ||= ServiceTemplateCatalog.find(params[:id])
409414
elsif x_active_tree == :ot_tree
410415
assert_privileges("orchestration_templates_view")
411416

412417
@record ||= OrchestrationTemplate.find(params[:id])
413418
else
414-
assert_privileges("st_catalog_view")
419+
assert_privileges("svc_catalog_provision", "svc_catalog_archive", "svc_catalog_unarchive")
415420

416421
identify_catalog(params[:id])
417422
@record ||= ServiceTemplateCatalog.find(params[:id])

0 commit comments

Comments
 (0)