|
@@ -15,7 +15,7 @@ class ApplicationController < ActionController::Base
|
|
|
end
|
|
|
|
|
|
def authenticate_admin!
|
|
|
- redirect_to(root_path, alert: 'Admin access required to view that page.') unless current_user && current_user.admin
|
|
|
+ redirect_to(root_path, alert: 'Admin access required to view that page.') unless current_user && current_user.admin?
|
|
|
end
|
|
|
|
|
|
def upgrade_warning
|
|
@@ -25,6 +25,7 @@ class ApplicationController < ActionController::Base
|
|
|
end
|
|
|
|
|
|
private
|
|
|
+
|
|
|
def twitter_oauth_check
|
|
|
if ENV['TWITTER_OAUTH_KEY'].blank? || ENV['TWITTER_OAUTH_SECRET'].blank?
|
|
|
if @twitter_agent = current_user.agents.where("type like 'Agents::Twitter%'").first
|
|
@@ -39,5 +40,4 @@ class ApplicationController < ActionController::Base
|
|
|
@basecamp_agent = current_user.agents.where(type: 'Agents::BasecampAgent').first
|
|
|
end
|
|
|
end
|
|
|
-
|
|
|
end
|