diff options
author | Azul <azul@leap.se> | 2014-07-28 09:52:47 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2014-07-31 10:02:38 +0200 |
commit | 297b42cd7557a7508cdbf091163da48bbd52a79a (patch) | |
tree | 2358174f2e8b13246cd570a6fa2c563392565b39 /app/controllers/v1/certs_controller.rb | |
parent | 791033d4a3021cc0a476a514667b17a6d519aa89 (diff) |
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.
Diffstat (limited to 'app/controllers/v1/certs_controller.rb')
-rw-r--r-- | app/controllers/v1/certs_controller.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/app/controllers/v1/certs_controller.rb b/app/controllers/v1/certs_controller.rb index 68d6586..99aec16 100644 --- a/app/controllers/v1/certs_controller.rb +++ b/app/controllers/v1/certs_controller.rb @@ -1,6 +1,6 @@ class V1::CertsController < ApiController - before_filter :require_login, :unless => :anonymous_certs_allowed? + before_filter :require_login, :unless => :anonymous_access_allowed? # GET /cert # deprecated - we actually create a new cert and that can @@ -18,10 +18,6 @@ class V1::CertsController < ApiController protected - def anonymous_certs_allowed? - APP_CONFIG[:allow_anonymous_certs] - end - def service_level current_user.effective_service_level end |