Browse Source

Fix functional user requirements in whitelist mode (#14093)

Fixes #14092
master
ThibG 3 years ago
committed by GitHub
parent
commit
ac8a788370
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 9 deletions
  1. +1
    -1
      app/controllers/accounts_controller.rb
  2. +1
    -1
      app/controllers/api/base_controller.rb
  3. +1
    -1
      app/controllers/directories_controller.rb
  4. +1
    -1
      app/controllers/follower_accounts_controller.rb
  5. +1
    -1
      app/controllers/following_accounts_controller.rb
  6. +1
    -1
      app/controllers/media_controller.rb
  7. +1
    -1
      app/controllers/remote_interaction_controller.rb
  8. +1
    -1
      app/controllers/statuses_controller.rb
  9. +1
    -1
      app/controllers/tags_controller.rb

+ 1
- 1
app/controllers/accounts_controller.rb View File

@ -11,7 +11,7 @@ class AccountsController < ApplicationController
before_action :set_body_classes
skip_around_action :set_locale, if: -> { [:json, :rss].include?(request.format&.to_sym) }
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
def show
respond_to do |format|

+ 1
- 1
app/controllers/api/base_controller.rb View File

@ -7,7 +7,7 @@ class Api::BaseController < ApplicationController
include RateLimitHeaders
skip_before_action :store_current_location
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
before_action :require_authenticated_user!, if: :disallow_unauthenticated_api_access?
before_action :set_cache_headers

+ 1
- 1
app/controllers/directories_controller.rb View File

@ -9,7 +9,7 @@ class DirectoriesController < ApplicationController
before_action :set_tag, only: :show
before_action :set_accounts
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
def index
render :index

+ 1
- 1
app/controllers/follower_accounts_controller.rb View File

@ -8,7 +8,7 @@ class FollowerAccountsController < ApplicationController
before_action :set_cache_headers
skip_around_action :set_locale, if: -> { request.format == :json }
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
def index
respond_to do |format|

+ 1
- 1
app/controllers/following_accounts_controller.rb View File

@ -8,7 +8,7 @@ class FollowingAccountsController < ApplicationController
before_action :set_cache_headers
skip_around_action :set_locale, if: -> { request.format == :json }
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
def index
respond_to do |format|

+ 1
- 1
app/controllers/media_controller.rb View File

@ -4,7 +4,7 @@ class MediaController < ApplicationController
include Authorization
skip_before_action :store_current_location
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
before_action :authenticate_user!, if: :whitelist_mode?
before_action :set_media_attachment

+ 1
- 1
app/controllers/remote_interaction_controller.rb View File

@ -10,7 +10,7 @@ class RemoteInteractionController < ApplicationController
before_action :set_status
before_action :set_body_classes
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
def new
@remote_follow = RemoteFollow.new(session_params)

+ 1
- 1
app/controllers/statuses_controller.rb View File

@ -19,7 +19,7 @@ class StatusesController < ApplicationController
before_action :set_autoplay, only: :embed
skip_around_action :set_locale, if: -> { request.format == :json }
skip_before_action :require_functional!, only: [:show, :embed]
skip_before_action :require_functional!, only: [:show, :embed], unless: :whitelist_mode?
content_security_policy only: :embed do |p|
p.frame_ancestors(false)

+ 1
- 1
app/controllers/tags_controller.rb View File

@ -15,7 +15,7 @@ class TagsController < ApplicationController
before_action :set_body_classes
before_action :set_instance_presenter
skip_before_action :require_functional!
skip_before_action :require_functional!, unless: :whitelist_mode?
def show
respond_to do |format|

Loading…
Cancel
Save