Allow turning keybase off instance-wide

This commit is contained in:
Thibaut Girka
2019-04-17 21:50:18 +02:00
committed by ThibG
parent e3c1472040
commit d83068016b
7 changed files with 22 additions and 0 deletions

View File

@ -2,8 +2,16 @@
module WellKnown
class KeybaseProofConfigController < ActionController::Base
before_action :check_enabled
def show
render json: {}, serializer: ProofProvider::Keybase::ConfigSerializer
end
private
def check_enabled
head 404 unless Setting.enable_keybase
end
end
end