Skip to content
Browse files

hiding the home page behidn login

  • Loading branch information...
1 parent 2bbe10f commit 7334557bf71db022e92e26216e24c49190d0fbda kale committed
Showing with 5 additions and 2 deletions.
  1. +2 −0 app/controllers/projects_controller.rb
  2. +2 −1 app/controllers/welcome_controller.rb
  3. +1 −1 config/routes.rb
View
2 app/controllers/projects_controller.rb
@@ -23,11 +23,13 @@ class ProjectsController < ApplicationController
menu_item :settings, :only => :settings
menu_item :issues, :only => [:changelog]
+ before_filter :require_login
before_filter :find_project, :except => [ :index, :list, :add, :copy, :activity ]
before_filter :find_optional_project, :only => :activity
before_filter :authorize, :except => [ :index, :list, :add, :copy, :archive, :unarchive, :destroy, :activity ]
before_filter :authorize_global, :only => :add
before_filter :require_admin, :only => [ :copy, :archive, :unarchive, :destroy ]
+
accept_key_auth :activity
after_filter :only => [:add, :edit, :archive, :unarchive, :destroy] do |controller|
View
3 app/controllers/welcome_controller.rb
@@ -17,7 +17,8 @@
class WelcomeController < ApplicationController
caches_action :robots
-
+ before_filter :require_login
+
def index
@news = News.latest User.current
@projects = Project.latest User.current
View
2 config/routes.rb
@@ -6,7 +6,7 @@
# map.connect 'products/:id', :controller => 'catalog', :action => 'view'
# Keep in mind you can assign values other than :controller and :action
- map.home '', :controller => 'account', :action => 'login'
+ map.home '', :controller => 'welcome'
map.signin 'login', :controller => 'account', :action => 'login'
map.signout 'logout', :controller => 'account', :action => 'logout'

0 comments on commit 7334557

Please sign in to comment.
Something went wrong with that request. Please try again.