-
Notifications
You must be signed in to change notification settings - Fork 654
Commit
…B/cartodb-central#678
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,7 @@ class ApplicationController < ActionController::Base | |
before_filter :store_request_host | ||
before_filter :ensure_user_organization_valid | ||
before_filter :ensure_org_url_if_org_user | ||
before_filter :ensure_account_has_been_activated | ||
before_filter :browser_is_html5_compliant? | ||
before_filter :allow_cross_domain_access | ||
before_filter :set_asset_debugging | ||
|
@@ -197,6 +198,12 @@ def ensure_org_url_if_org_user | |
end | ||
end | ||
|
||
def ensure_account_has_been_activated | ||
return unless current_user | ||
|
||
redirect_to CartoDB.url(self, 'account_token_authentication_error') unless current_user.enable_account_token.nil? | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
juanignaciosl
Author
Contributor
|
||
end | ||
|
||
def add_revision_header | ||
response.headers['X-CartoDB-Rev'] = CartoDB::CARTODB_REV unless CartoDB::CARTODB_REV.nil? | ||
end | ||
|
this redirect also works with api/json endpoints?