Skip to content

Commit

Permalink
??
Browse files Browse the repository at this point in the history
  • Loading branch information
Ember-ruby committed Jun 29, 2024
1 parent 32b3b2a commit 513712f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/api/v1/timelines/public_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

class Api::V1::Timelines::PublicController < Api::V1::Timelines::BaseController
before_action :require_user!, only: [:show], if: :require_auth? || :require_auth_local? || :require_auth_remote?
before_action :require_user!, only: [:show], if: :require_auth?

PERMITTED_PARAMS = %i(local remote limit only_media allow_local_only).freeze

Expand All @@ -15,6 +15,8 @@ def show

def require_auth?
!Setting.timeline_preview

Check warning on line 17 in app/controllers/api/v1/timelines/public_controller.rb

View workflow job for this annotation

GitHub Actions / lint

[Correctable] Lint/Void: Operator ! used in void context.
!Setting.timeline_preview_local && !truthy_param?(:local)
!Setting.timeline_preview_remote && !truthy_param?(:remote)
end

def require_auth_local?
Expand Down

0 comments on commit 513712f

Please sign in to comment.