From 662c7432ef0643925d8f89c11bd29040f51edb75 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Thu, 24 Sep 2020 17:47:07 +1000 Subject: [PATCH] Remove uncessary guardian checks --- lib/custom_wizard/action.rb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/custom_wizard/action.rb b/lib/custom_wizard/action.rb index a916d847..fcd5b46a 100644 --- a/lib/custom_wizard/action.rb +++ b/lib/custom_wizard/action.rb @@ -320,9 +320,7 @@ class CustomWizard::Action log_info("route: #{route_to}") end - def create_group - guardian.ensure_can_create!(Group) - + def create_group group = begin Group.new(new_group_params) @@ -339,9 +337,7 @@ class CustomWizard::Action end end - def create_category - guardian.ensure_can_create!(Category) - + def create_category category = begin Category.new(new_category_params.merge(user: user))