Made having a confirmed email required to manage blog posts.

This commit is contained in:
Logan Fick
2017-11-19 15:33:02 -05:00
parent 42722d03a0
commit 40337f9e68
3 changed files with 29 additions and 9 deletions

View File

@@ -69,7 +69,7 @@ class BlogpostsController < ApplicationController
end
def auth
unless mod?
unless mod? && current_user.confirmed?
flash[:alert] = "You are not allowed to edit posts!"
redirect_to @post ? @post : blogposts_path
end