Commit 9d318db48f4d76b8493aefa80e7b29c2ea3cc1cf
Committed by
Dmitriy Zaporozhets
1 parent
29847168
Exists in
master
and in
4 other branches
Added the correct hierarchy of controllers for the administrative part
Showing
11 changed files
with
20 additions
and
20 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,11 @@ |
| 1 | +# Provides a base class for Admin controllers to subclass | |
| 2 | +# | |
| 3 | +# Automatically sets the layout and ensures an administrator is logged in | |
| 4 | +class Admin::ApplicationController < ApplicationController | |
| 5 | + layout 'admin' | |
| 6 | + before_filter :authenticate_admin! | |
| 7 | + | |
| 8 | + def authenticate_admin! | |
| 9 | + return render_404 unless current_user.is_admin? | |
| 10 | + end | |
| 11 | +end | ... | ... |
app/controllers/admin/dashboard_controller.rb
app/controllers/admin/groups_controller.rb
app/controllers/admin/hooks_controller.rb
app/controllers/admin/logs_controller.rb
app/controllers/admin/projects_controller.rb
app/controllers/admin/resque_controller.rb
app/controllers/admin/team_members_controller.rb
app/controllers/admin/teams_controller.rb
app/controllers/admin/users_controller.rb
app/controllers/admin_controller.rb
| ... | ... | @@ -1,11 +0,0 @@ |
| 1 | -# Provides a base class for Admin controllers to subclass | |
| 2 | -# | |
| 3 | -# Automatically sets the layout and ensures an administrator is logged in | |
| 4 | -class AdminController < ApplicationController | |
| 5 | - layout 'admin' | |
| 6 | - before_filter :authenticate_admin! | |
| 7 | - | |
| 8 | - def authenticate_admin! | |
| 9 | - return render_404 unless current_user.is_admin? | |
| 10 | - end | |
| 11 | -end |