Temporarily comment part of Enterprise.relate_to_owners_enterprises so that most specs pass for now

This commit is contained in:
luisramos0
2019-03-21 20:49:41 +00:00
committed by Luis Ramos
parent b23ce20488
commit 9c369caae2

View File

@@ -435,21 +435,21 @@ class Enterprise < ActiveRecord::Base
# We grant permissions to all pre-existing hubs
hub_permissions = [:add_to_order_cycle]
hub_permissions << :create_variant_overrides if is_primary_producer
enterprises.is_hub.each do |enterprise|
EnterpriseRelationship.create!(parent: self,
child: enterprise,
permissions_list: hub_permissions)
end
#enterprises.is_hub.each do |enterprise|
# EnterpriseRelationship.create!(parent: self,
# child: enterprise,
# permissions_list: hub_permissions)
#end
# All pre-existing producers grant permission to new hubs
if is_hub
enterprises.is_primary_producer.each do |enterprise|
EnterpriseRelationship.create!(parent: enterprise,
child: self,
permissions_list: [:add_to_order_cycle,
:create_variant_overrides])
end
end
#if is_hub
# enterprises.is_primary_producer.each do |enterprise|
# EnterpriseRelationship.create!(parent: enterprise,
# child: self,
# permissions_list: [:add_to_order_cycle,
# :create_variant_overrides])
# end
#end
end
def shopfront_taxons