Permalink
Browse files

Protect admin space

  • Loading branch information...
1 parent 3094083 commit b7c09a078f0a6bb4a4d4b077bdb32f02e1e08606 @marktabler committed Jun 10, 2013
@@ -1,2 +1,5 @@
class Admin::LicensesController < ApplicationController
+
+ before_filter :admin_required
+
end
@@ -1,2 +1,5 @@
class Admin::MachinesController < ApplicationController
+
+ before_filter :admin_required
+
end
@@ -1,2 +1,5 @@
class Admin::UsersController < ApplicationController
+
+ before_filter :admin_required
+
end
@@ -1,5 +0,0 @@
-class UsersController < ApplicationController
-
- before_filter :admin_required
-
-end
@@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title><%= content_for?(:title) ? yield(:title) : "Myapp" %></title>
+ <title><%= content_for?(:title) ? yield(:title) : "Norrington" %></title>
<meta name="description" content="">
<meta name="author" content="">
<%= stylesheet_link_tag "application", :media => "all" %>
View
@@ -11,10 +11,14 @@
resources :licenses
- resources :users
-
resources :machines
+ namespace :admin do
+ resources :users
+ resources :machines
+ resources :licenses
+ end
+
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".

0 comments on commit b7c09a0

Please sign in to comment.