mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Add more order privileges for distributor enterprise users
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
Spree::Admin::Orders::CustomerDetailsController.class_eval do
|
||||
#Override BaseController.authorize_admin to inherit CanCan permissions for the current order
|
||||
def authorize_admin
|
||||
load_order unless @order
|
||||
authorize! :admin, @order
|
||||
authorize! params[:action].to_sym, @order
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user