* Ensure verify_authorized in internal * Create internal_policy * Replace ArticlePolicy usage with InternalPolicy * Replace BufferUpdate&CommentPolicy with InternalPolicy * Remove verbose authorize_admin * Forgot to remove coresponding specs * Create specs for InternalPolicy * Expand policy access on internal's broadcast * Refactor * Create shared spec * Create request specs * Add additional test cases
9 lines
187 B
Ruby
9 lines
187 B
Ruby
class InternalPolicy < ApplicationPolicy
|
|
def access?
|
|
user.has_any_role?(
|
|
{ name: :single_resource_admin, resource: record },
|
|
:super_admin,
|
|
:admin,
|
|
)
|
|
end
|
|
end
|