Add admin API for managing canonical e-mail blocks (#19067)
This commit is contained in:
parent
b399d79545
commit
c556c3a0d1
11 changed files with 177 additions and 36 deletions
23
app/policies/canonical_email_block_policy.rb
Normal file
23
app/policies/canonical_email_block_policy.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class CanonicalEmailBlockPolicy < ApplicationPolicy
|
||||
def index?
|
||||
role.can?(:manage_blocks)
|
||||
end
|
||||
|
||||
def show?
|
||||
role.can?(:manage_blocks)
|
||||
end
|
||||
|
||||
def test?
|
||||
role.can?(:manage_blocks)
|
||||
end
|
||||
|
||||
def create?
|
||||
role.can?(:manage_blocks)
|
||||
end
|
||||
|
||||
def destroy?
|
||||
role.can?(:manage_blocks)
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue