summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/controller_extension/authentication.rb6
-rw-r--r--app/controllers/v1/certs_controller.rb6
2 files changed, 6 insertions, 6 deletions
diff --git a/app/controllers/controller_extension/authentication.rb b/app/controllers/controller_extension/authentication.rb
index 2bc0aee..1f73f38 100644
--- a/app/controllers/controller_extension/authentication.rb
+++ b/app/controllers/controller_extension/authentication.rb
@@ -8,7 +8,7 @@ module ControllerExtension::Authentication
end
def current_user
- @current_user ||= token_authenticate || warden.user || unauthenticated
+ @current_user ||= token_authenticate || warden.user || anonymous
end
def logged_in?
@@ -75,7 +75,7 @@ module ControllerExtension::Authentication
protected
- def unauthenticated
- UnauthenticatedUser.new
+ def anonymous
+ AnonymousUser.new
end
end
diff --git a/app/controllers/v1/certs_controller.rb b/app/controllers/v1/certs_controller.rb
index 580c90c..73409ef 100644
--- a/app/controllers/v1/certs_controller.rb
+++ b/app/controllers/v1/certs_controller.rb
@@ -1,6 +1,6 @@
class V1::CertsController < ApplicationController
- before_filter :require_eip_access
+ before_filter :require_login, :unless => :anonymous_certs_allowed?
# GET /cert
def show
@@ -10,8 +10,8 @@ class V1::CertsController < ApplicationController
protected
- def require_eip_access
- access_denied unless service_level.provides?(:eip)
+ def anonymous_certs_allowed?
+ APP_CONFIG[:allow_anonymous_certs]
end
def service_level