Use CanCanCan for messages controller

This commit is contained in:
Andy Allan 2019-01-09 15:27:29 +01:00
parent fac3f0ef24
commit 425f42dd80
2 changed files with 4 additions and 1 deletions

View 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]