Skip to content

Commit

Permalink
#51 Admin only secrets controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesprior committed Jan 27, 2013
1 parent 3ec9c89 commit f694bc4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/admin/secrets_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Admin::SecretsController < ApplicationController
before_filter :require_admin
before_filter :require_admin, :load_autofingers
# GET /admin/secrets
def index
@secrets = Secret.page(params[:page]).order("date DESC")
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def require_no_user


def require_admin
if !true # TODO determine how a user is admin
redirect_to login_path
if current_account.nil? || !current_account.is_admin?
redirect_to root_path
end
end

Expand Down

0 comments on commit f694bc4

Please sign in to comment.