Allow turning keybase off instance-wide
This commit is contained in:
parent
e3c1472040
commit
d83068016b
7 changed files with 22 additions and 0 deletions
|
@ -5,6 +5,7 @@ class Settings::IdentityProofsController < Settings::BaseController
|
|||
|
||||
before_action :authenticate_user!
|
||||
before_action :check_required_params, only: :new
|
||||
before_action :check_enabled, only: :new
|
||||
|
||||
def index
|
||||
@proofs = AccountIdentityProof.where(account: current_account).order(provider: :asc, provider_username: :asc)
|
||||
|
@ -41,6 +42,10 @@ class Settings::IdentityProofsController < Settings::BaseController
|
|||
|
||||
private
|
||||
|
||||
def check_enabled
|
||||
not_found unless Setting.enable_keybase
|
||||
end
|
||||
|
||||
def check_required_params
|
||||
redirect_to settings_identity_proofs_path unless [:provider, :provider_username, :username, :token].all? { |k| params[k].present? }
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue