only requested lists can be updated

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@270 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-02-25 18:14:43 +00:00
parent 159c23b943
commit 35cf1e6258
2 changed files with 3 additions and 4 deletions
@@ -48,9 +48,8 @@ class MailingListsController < ApplicationController
end
end
def edit
@mailing_list = MailingList.find(params[:id])
if request.post? and @mailing_list.update_attributes(params[:mailing_list])
def edit
if request.post? && @mailing_list.status == MailingList::STATUS_REQUESTED && @mailing_list.update_attributes(params[:mailing_list])
flash[:notice] = l(:notice_successful_update)
redirect_to :controller => 'projects', :action => 'settings', :tab => 'mailing-lists', :id => @project
end