lib/orange-more/administration/cartons/user.rb in orange-0.2.8 vs lib/orange-more/administration/cartons/user.rb in orange-0.2.9

- old
+ new

@@ -10,10 +10,10 @@ has n, :orange_sites, :through => Resource def allowed?(packet) subsite_access = packet['subsite'].blank? ? false : self.orange_sites.first(:id => packet['subsite'].id) site_access = self.orange_sites.first(:id => packet['site'].id) - if(site_access) + if(!site_access.blank?) true elsif !packet['subsite'].blank? && subsite_access true else false \ No newline at end of file