You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
481 B
17 lines
481 B
# frozen_string_literal: true |
|
|
|
class Api::V1::Timelines::TopicController < Api::V1::Timelines::BaseController |
|
before_action :require_user!, if: :require_auth? |
|
|
|
private |
|
|
|
def require_auth? |
|
if truthy_param?(:local) |
|
Setting.local_topic_feed_access != 'public' |
|
elsif truthy_param?(:remote) |
|
Setting.remote_topic_feed_access != 'public' |
|
else |
|
Setting.local_topic_feed_access != 'public' || Setting.remote_topic_feed_access != 'public' |
|
end |
|
end |
|
end
|
|
|