mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Admin::VoucherController check enterprise permission
This commit is contained in:
committed by
Maikel Linke
parent
355af9e818
commit
abf2105df7
@@ -26,7 +26,10 @@ module Admin
|
||||
private
|
||||
|
||||
def load_enterprise
|
||||
@enterprise = Enterprise.find_by(permalink: params[:enterprise_id])
|
||||
@enterprise = OpenFoodNetwork::Permissions
|
||||
.new(spree_current_user)
|
||||
.editable_enterprises
|
||||
.find_by(permalink: params[:enterprise_id])
|
||||
end
|
||||
|
||||
def permitted_resource_params
|
||||
|
||||
Reference in New Issue
Block a user