diff options
author | jessib <jessib@riseup.net> | 2014-02-10 10:27:52 -0800 |
---|---|---|
committer | jessib <jessib@riseup.net> | 2014-02-10 10:27:52 -0800 |
commit | b6ef51277b4e6d65cfda15f0124ae4f222f7f241 (patch) | |
tree | da7eb2d3a3a648be0be519aae23f997f248ba320 /certs | |
parent | bcdde2f6bfb4ed3a1535bd2e50ab47529a9141e2 (diff) | |
parent | b4719619aabbe9ebf74563b62e1eb8e4fb248c21 (diff) |
Merge pull request #138 from azul/feature/token-only-api-auth
Feature/token only api auth
Diffstat (limited to 'certs')
-rw-r--r-- | certs/app/controllers/certs_controller.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/certs/app/controllers/certs_controller.rb b/certs/app/controllers/certs_controller.rb index 62ef3fd..82cbc44 100644 --- a/certs/app/controllers/certs_controller.rb +++ b/certs/app/controllers/certs_controller.rb @@ -1,6 +1,6 @@ class CertsController < ApplicationController - before_filter :login_if_required + before_filter :require_login, :unless => :anonymous_certs_allowed? # GET /cert def show @@ -10,10 +10,9 @@ class CertsController < ApplicationController protected - def login_if_required - authorize unless APP_CONFIG[:allow_anonymous_certs] + def anonymous_certs_allowed? + APP_CONFIG[:allow_anonymous_certs] end - # # this is some temporary logic until we store the service level in the user db. # |