diff options
Diffstat (limited to 'lib/admin_rack.rb')
-rw-r--r-- | lib/admin_rack.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/admin_rack.rb b/lib/admin_rack.rb deleted file mode 100644 index 39253b3d7..000000000 --- a/lib/admin_rack.rb +++ /dev/null @@ -1,19 +0,0 @@ -class AdminRack - def initialize(app) - @app = app - end - - def call(env) - user = env['warden'].authenticate(:scope => :user) - if user && user.admin? - @app.call(env) - else - [307, {"Location" => '/'}, self] - end - end - - def each(&block) - end -end - - |