Skip to content

Instantly share code, notes, and snippets.

@chadwpry
Created September 30, 2008 14:49
Show Gist options
  • Save chadwpry/13838 to your computer and use it in GitHub Desktop.
Save chadwpry/13838 to your computer and use it in GitHub Desktop.
class Admin::BaseController < ApplicationController
include AuthenticatedSystem
include SslRequirement
audit Affiliate, Category, Industry, Permission, Promotion
before_filter :login_required
before_filter :site_administrator?
def ssl_required?
return false if local_request? || RAILS_ENV == 'test' || RAILS_ENV == 'development'
super
end
def site_administrator?
current_user || current_user.site_administrator?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment