app/models/c80_estate/property.rb in c80_estate-0.1.0.29 vs app/models/c80_estate/property.rb in c80_estate-0.1.0.30
- old
+ new
@@ -93,10 +93,10 @@
# если юзер - админ - ему выдаются все объекты
def self.where_assig_user(user)
if user.can_create_properties?
C80Estate::Property.all
else
- C80Estate::Property.where(:assigned_person_id => current_admin_user.id)
+ C80Estate::Property.where(:assigned_person_id => user.id)
end
end
def average_price(atype_id: nil)
\ No newline at end of file