Skip to content

Commit

Permalink
Add field policy for filtering source_ip in detection
Browse files Browse the repository at this point in the history
  • Loading branch information
skanderm committed Mar 26, 2024
1 parent fb5c3a6 commit ea6611a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions server/lib/orcasite/radio/detection.ex
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ defmodule Orcasite.Radio.Detection do
end
end

field_policies do
field_policy [:source_ip] do
authorize_if actor_attribute_equals(:admin, true)
authorize_if actor_attribute_equals(:moderator, true)
end

field_policy :* do
authorize_if always()
end
end

actions do
defaults [:destroy]

Expand Down

0 comments on commit ea6611a

Please sign in to comment.