Add IP-based rules (#14963)
This commit is contained in:
parent
dc52a778e1
commit
5e1364c448
30 changed files with 530 additions and 21 deletions
15
app/policies/ip_block_policy.rb
Normal file
15
app/policies/ip_block_policy.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class IpBlockPolicy < ApplicationPolicy
|
||||
def index?
|
||||
admin?
|
||||
end
|
||||
|
||||
def create?
|
||||
admin?
|
||||
end
|
||||
|
||||
def destroy?
|
||||
admin?
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue