0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-22 09:20:29 +01:00

Remove uncessary guardian checks

Dieser Commit ist enthalten in:
Angus McLeod 2020-09-24 17:47:07 +10:00
Ursprung e34a24c495
Commit 662c7432ef

Datei anzeigen

@ -320,9 +320,7 @@ class CustomWizard::Action
log_info("route: #{route_to}") log_info("route: #{route_to}")
end end
def create_group def create_group
guardian.ensure_can_create!(Group)
group = group =
begin begin
Group.new(new_group_params) Group.new(new_group_params)
@ -339,9 +337,7 @@ class CustomWizard::Action
end end
end end
def create_category def create_category
guardian.ensure_can_create!(Category)
category = category =
begin begin
Category.new(new_category_params.merge(user: user)) Category.new(new_category_params.merge(user: user))