Skip to content

Commit

Permalink
hiding the home page behidn login
Browse files Browse the repository at this point in the history
  • Loading branch information
kale authored and kale committed Feb 4, 2010
1 parent 2bbe10f commit 7334557
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 2 additions & 0 deletions app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/welcome_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 7334557

Please sign in to comment.