Change REST API to return empty data for suspended accounts (#14765)
This commit is contained in:
parent
e6d67f85e2
commit
e6b272e5c9
22 changed files with 79 additions and 30 deletions
|
@ -9,7 +9,6 @@ class Api::V1::AccountsController < Api::BaseController
|
|||
|
||||
before_action :require_user!, except: [:show, :create]
|
||||
before_action :set_account, except: [:create]
|
||||
before_action :check_account_suspension, only: [:show]
|
||||
before_action :check_enabled_registrations, only: [:create]
|
||||
|
||||
skip_before_action :require_authenticated_user!, only: :create
|
||||
|
@ -73,10 +72,6 @@ class Api::V1::AccountsController < Api::BaseController
|
|||
AccountRelationshipsPresenter.new([@account.id], current_user.account_id, options)
|
||||
end
|
||||
|
||||
def check_account_suspension
|
||||
gone if @account.suspended?
|
||||
end
|
||||
|
||||
def account_params
|
||||
params.permit(:username, :email, :password, :agreement, :locale, :reason)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue