From b399d79545e5e5430cb9d6a2c936efc244b69a75 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 27 Aug 2022 20:56:47 +0200 Subject: Add admin API for managing IP blocks (#19065) --- app/policies/ip_block_policy.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/policies/ip_block_policy.rb') diff --git a/app/policies/ip_block_policy.rb b/app/policies/ip_block_policy.rb index 1abc97ad8..2986a4fdb 100644 --- a/app/policies/ip_block_policy.rb +++ b/app/policies/ip_block_policy.rb @@ -9,6 +9,10 @@ class IpBlockPolicy < ApplicationPolicy role.can?(:manage_blocks) end + def update? + role.can?(:manage_blocks) + end + def destroy? role.can?(:manage_blocks) end -- cgit