From 297b42cd7557a7508cdbf091163da48bbd52a79a Mon Sep 17 00:00:00 2001 From: Azul Date: Mon, 28 Jul 2014 09:52:47 +0200 Subject: use ApiController#anonymous_access_allowed? There are some places where we only want to require login unless you can use EIP anonymously. So far we had an anonymous_certs_allowed? method in all these controllers. Now it's replaced with ApiController#anonymous_access_allowed?. The naming better reflects that there might be other services that allow anonymous use at some point. This also fixed a typo name -> @filename that broke the ConfigsController. --- app/controllers/v1/services_controller.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/controllers/v1/services_controller.rb') diff --git a/app/controllers/v1/services_controller.rb b/app/controllers/v1/services_controller.rb index 114870f..523eb44 100644 --- a/app/controllers/v1/services_controller.rb +++ b/app/controllers/v1/services_controller.rb @@ -1,5 +1,7 @@ class V1::ServicesController < ApiController + before_filter :require_login, :unless => :anonymous_access_allowed? + def show respond_with current_user.effective_service_level end -- cgit v1.2.3