about summary refs log tree commit diff
path: root/app/controllers/settings/identity_proofs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/settings/identity_proofs_controller.rb')
-rw-r--r--app/controllers/settings/identity_proofs_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/settings/identity_proofs_controller.rb b/app/controllers/settings/identity_proofs_controller.rb
index bf2899da6..4618c7883 100644
--- a/app/controllers/settings/identity_proofs_controller.rb
+++ b/app/controllers/settings/identity_proofs_controller.rb
@@ -2,6 +2,7 @@
 
 class Settings::IdentityProofsController < Settings::BaseController
   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)
@@ -42,6 +43,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