summaryrefslogtreecommitdiff
path: root/app/controllers/v1/certs_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/v1/certs_controller.rb')
-rw-r--r--app/controllers/v1/certs_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/v1/certs_controller.rb b/app/controllers/v1/certs_controller.rb
index 99aec16..ffa6e35 100644
--- a/app/controllers/v1/certs_controller.rb
+++ b/app/controllers/v1/certs_controller.rb
@@ -1,6 +1,7 @@
class V1::CertsController < ApiController
before_filter :require_login, :unless => :anonymous_access_allowed?
+ before_filter :require_enabled
# GET /cert
# deprecated - we actually create a new cert and that can
@@ -18,6 +19,12 @@ class V1::CertsController < ApiController
protected
+ def require_enabled
+ if !current_user.is_anonymous? && !current_user.enabled?
+ access_denied
+ end
+ end
+
def service_level
current_user.effective_service_level
end