Disable deletion in forums #56

Merged
ThatSimplex merged 4 commits from disable_deletion into master 2019-02-24 13:02:45 -05:00
Showing only changes of commit 2fe1cead68 - Show all commits

View File

@@ -73,7 +73,7 @@ class ForumthreadsController < ApplicationController
end
def destroy
if mod? || @thread.author.is?(current_user)
if mod? || (@thread.author.is?(current_user) && !@thread.forum.disable_deletion)
if @thread.destroy
flash[:notice] = "Thread deleted!"
else