mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
Add cancan permissions for Admin::ManagerInvitationsController
This commit is contained in:
committed by
Rob Harrington
parent
6ae1780180
commit
b431a7417a
@@ -1,5 +1,7 @@
|
||||
module Admin
|
||||
class ManagerInvitationsController < Spree::Admin::BaseController
|
||||
authorize_resource class: false
|
||||
|
||||
def create
|
||||
@email = params[:email]
|
||||
@enterprise = Enterprise.find(params[:enterprise_id])
|
||||
|
||||
@@ -127,6 +127,8 @@ class AbilityDecorator
|
||||
can [:admin, :connect, :status, :destroy], StripeAccount do |stripe_account|
|
||||
user.enterprises.include? stripe_account.enterprise
|
||||
end
|
||||
|
||||
can [:admin, :create], :manager_invitation
|
||||
end
|
||||
|
||||
def add_product_management_abilities(user)
|
||||
|
||||
Reference in New Issue
Block a user