summaryrefslogtreecommitdiff
path: root/app/controllers/v1/configs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/v1/configs_controller.rb')
-rw-r--r--app/controllers/v1/configs_controller.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/controllers/v1/configs_controller.rb b/app/controllers/v1/configs_controller.rb
index 9c01605..b050f0a 100644
--- a/app/controllers/v1/configs_controller.rb
+++ b/app/controllers/v1/configs_controller.rb
@@ -1,7 +1,7 @@
class V1::ConfigsController < ApiController
include ControllerExtension::JsonFile
- before_filter :require_login, :unless => :anonymous_certs_allowed?
+ before_filter :require_login, :unless => :anonymous_access_allowed?
before_filter :sanitize_filename, only: :show
before_filter :fetch_file, only: :show
@@ -21,10 +21,6 @@ class V1::ConfigsController < ApiController
protected
- def anonymous_certs_allowed?
- APP_CONFIG[:allow_anonymous_certs]
- end
-
def service_paths
Hash[SERVICES.map{|k,v| [k,"/1/configs/#{v}"] } ]
end
@@ -32,7 +28,7 @@ class V1::ConfigsController < ApiController
def sanitize_filename
@filename = params[:id].downcase
@filename += '.json' unless @filename.ends_with?('.json')
- access_denied unless SERVICES.values.include? name
+ access_denied unless SERVICES.values.include? @filename
@filename = Rails.root.join('public', '1', 'config', @filename)
end
end