Added authenticate filters.

This commit is contained in:
George Vinogradov 2011-10-24 17:01:15 +04:00
parent 51ed1f3bab
commit bc761b4ef3
5 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,6 @@
class DownloadsController < ApplicationController
before_filter :authenticate_user!
def index
@downloads = Download.paginate :page => params[:page], :per_page => 30
end

View File

@ -1,4 +1,6 @@
class PrivateUsersController < ApplicationController
before_filter :authenticate_user!
def index
@private_users = PrivateUser.where(:platform_id => params[:platform_id]).paginate :page => params[:page]
@platform = Platform.find(params[:platform_id])
@ -14,4 +16,4 @@ class PrivateUsersController < ApplicationController
PrivateUser.find(params[:id]).destroy
redirect_to platform_private_users_path(params[:platform_id])
end
end
end

View File

@ -1,7 +1,9 @@
class PrivatesController < ApplicationController
require 'digest/sha2'
before_filter :authenticate_user!
before_filter :find_platform
before_filter :authenticate
def show

View File

@ -1,4 +1,5 @@
class RolesController < ApplicationController
before_filter :authenticate_user!
before_filter :find_role, :only => [:show, :edit, :update, :destroy]
before_filter :find_visibilities, :only => [:new, :edit]

View File

@ -1,4 +1,6 @@
class UsersController < ApplicationController
before_filter :authenticate_user!
before_filter :find_user, :only => [:show, :edit, :update, :destroy]
def index