diff --git a/promotions/lib/controllers/admin/solidus_promotions/promotion_categories_controller.rb b/promotions/lib/controllers/admin/solidus_promotions/promotion_categories_controller.rb index cefb9d44d5d..0218e3a94c2 100644 --- a/promotions/lib/controllers/admin/solidus_promotions/promotion_categories_controller.rb +++ b/promotions/lib/controllers/admin/solidus_promotions/promotion_categories_controller.rb @@ -25,5 +25,11 @@ def destroy flash[:notice] = t(".success") redirect_back_or_to solidus_promotions.promotion_categories_path, status: :see_other end + + private + + def authorization_subject + SolidusPromotions::PromotionCategory + end end end diff --git a/promotions/lib/controllers/admin/solidus_promotions/promotions_controller.rb b/promotions/lib/controllers/admin/solidus_promotions/promotions_controller.rb index 77bc6515108..62b856006a0 100644 --- a/promotions/lib/controllers/admin/solidus_promotions/promotions_controller.rb +++ b/promotions/lib/controllers/admin/solidus_promotions/promotions_controller.rb @@ -42,5 +42,9 @@ def load_promotion def promotion_params params.require(:promotion).permit(:user_id, permitted_promotion_attributes) end + + def authorization_subject + SolidusPromotions::Promotion + end end end