Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/admin_rack.rb')
-rw-r--r--lib/admin_rack.rb19
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
-
-