Feature #1007 » projects_controller.rb.patch
| projects_controller.rb 2009-05-14 14:49:38.000000000 -0700 | ||
|---|---|---|
|
before_filter :find_project, :except => [ :index, :list, :add, :activity ]
|
||
|
before_filter :find_optional_project, :only => :activity
|
||
|
before_filter :authorize, :except => [ :index, :list, :add, :archive, :unarchive, :destroy, :activity ]
|
||
|
before_filter :require_admin, :only => [ :add, :archive, :unarchive, :destroy ]
|
||
|
before_filter :require_login, :only => :add
|
||
|
before_filter :require_admin, :only => [ :archive, :unarchive, :destroy ]
|
||
|
accept_key_auth :activity
|
||
|
|
||
|
helper :sort
|
||
| ... | ... | |
|
@project.enabled_module_names = params[:enabled_modules]
|
||
|
if @project.save
|
||
|
flash[:notice] = l(:notice_successful_create)
|
||
|
redirect_to :controller => 'admin', :action => 'projects'
|
||
|
end
|
||
|
if User.current.admin
|
||
|
redirect_to :controller => 'admin', :action => 'projects'
|
||
|
else
|
||
|
@project.members << Member.new(:project_id => @project, :user_id => User.current.id, :role_id => '3')
|
||
|
redirect_to :controller => 'projects', :action => 'index'
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
- « Previous
- 1
- 2
- Next »