From 96f099799233c65fd4bdf0f9762d78442e214026 Mon Sep 17 00:00:00 2001 From: trwnh Date: Wed, 9 Nov 2022 08:22:58 -0600 Subject: [PATCH] Fix GET /api/v1/admin/ip_blocks/:id (#20207) --- app/policies/ip_block_policy.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/policies/ip_block_policy.rb b/app/policies/ip_block_policy.rb index 2986a4fdb3..8baf6ee2dc 100644 --- a/app/policies/ip_block_policy.rb +++ b/app/policies/ip_block_policy.rb @@ -5,6 +5,10 @@ class IpBlockPolicy < ApplicationPolicy role.can?(:manage_blocks) end + def show? + role.can?(:manage_blocks) + end + def create? role.can?(:manage_blocks) end