diff options
Diffstat (limited to 'lib/banzai/filter/redactor_filter.rb')
-rw-r--r-- | lib/banzai/filter/redactor_filter.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/lib/banzai/filter/redactor_filter.rb b/lib/banzai/filter/redactor_filter.rb deleted file mode 100644 index 1f091f594f8..00000000000 --- a/lib/banzai/filter/redactor_filter.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -module Banzai - module Filter - # HTML filter that removes references to records that the current user does - # not have permission to view. - # - # Expected to be run in its own post-processing pipeline. - # - class RedactorFilter < HTML::Pipeline::Filter - def call - unless context[:skip_redaction] - context = RenderContext.new(project, current_user) - - Redactor.new(context).redact([doc]) - end - - doc - end - - private - - def current_user - context[:current_user] - end - - def project - context[:project] - end - end - end -end |