]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/messages_controller.rb
Use CanCanCan to control access to oauth controller actions
[rails.git] / app / controllers / messages_controller.rb
index c93c998f02655e60bee8ea202853005a0ee61d91..dce0099e5b68caeceb12f1f5fa41865d4c3db0b9 100644 (file)
@@ -3,7 +3,9 @@ class MessagesController < ApplicationController
 
   before_action :authorize_web
   before_action :set_locale
-  before_action :require_user
+
+  authorize_resource
+
   before_action :lookup_user, :only => [:new, :create]
   before_action :check_database_readable
   before_action :check_database_writable, :only => [:new, :create, :reply, :mark, :destroy]