Permalink
Browse files

api: IpTrafficMonitor.List: fix user query

  • Loading branch information...
aither64 committed Jan 31, 2019
1 parent 26365ee commit c42c16929581fb1f1185215de3ae8fb4c9b97ce7
Showing with 3 additions and 1 deletion.
  1. +3 −1 api/lib/vpsadmin/api/resources/ip_traffic_monitor.rb
@@ -67,7 +67,9 @@ def query
q = ::IpTrafficLiveMonitor.where('delta > 0')

if current_user.role != :admin
q = q.joins(ip_address: :vps).where(vpses: {user_id: current_user.id})
q = q.joins(ip_address: {network_interface: :vps}).where(
vpses: {user_id: current_user.id},
)
end

# Directly accessible filters

0 comments on commit c42c169

Please sign in to comment.