diff --git a/app/controllers/downloads_controller.rb b/app/controllers/downloads_controller.rb index 763aec82b..4b19901ae 100644 --- a/app/controllers/downloads_controller.rb +++ b/app/controllers/downloads_controller.rb @@ -1,4 +1,6 @@ class DownloadsController < ApplicationController + before_filter :authenticate_user! + def index @downloads = Download.paginate :page => params[:page], :per_page => 30 end diff --git a/app/controllers/private_users_controller.rb b/app/controllers/private_users_controller.rb index 0c8df627b..02b6e2339 100644 --- a/app/controllers/private_users_controller.rb +++ b/app/controllers/private_users_controller.rb @@ -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 \ No newline at end of file +end diff --git a/app/controllers/privates_controller.rb b/app/controllers/privates_controller.rb index b014f491f..9b24d42cb 100644 --- a/app/controllers/privates_controller.rb +++ b/app/controllers/privates_controller.rb @@ -1,7 +1,9 @@ class PrivatesController < ApplicationController require 'digest/sha2' + before_filter :authenticate_user! before_filter :find_platform + before_filter :authenticate def show diff --git a/app/controllers/roles_controller.rb b/app/controllers/roles_controller.rb index a835c409c..22c3b0ebb 100644 --- a/app/controllers/roles_controller.rb +++ b/app/controllers/roles_controller.rb @@ -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] diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 8707ec422..d1d3603ad 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,4 +1,6 @@ class UsersController < ApplicationController + before_filter :authenticate_user! + before_filter :find_user, :only => [:show, :edit, :update, :destroy] def index