]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/messages_controller.rb
Ensure database is writable before destroying a message
[rails.git] / app / controllers / messages_controller.rb
index e59642fc76b3f6eef13e4a77748b49f256ac8bda..99884295bb30577ba08cfcaa0e3d1bad3a05d0b3 100644 (file)
@@ -6,7 +6,7 @@ class MessagesController < ApplicationController
   before_action :require_user
   before_action :lookup_user, :only => [:new]
   before_action :check_database_readable
   before_action :require_user
   before_action :lookup_user, :only => [:new]
   before_action :check_database_readable
-  before_action :check_database_writable, :only => [:new, :reply, :mark]
+  before_action :check_database_writable, :only => [:new, :reply, :mark, :destroy]
   before_action :allow_thirdparty_images, :only => [:new, :show]
 
   # Allow the user to write a new message to another user. This action also
   before_action :allow_thirdparty_images, :only => [:new, :show]
 
   # Allow the user to write a new message to another user. This action also