Skip to content
Snippets Groups Projects
Unverified Commit 2770b5f6 authored by ArtOfCode's avatar ArtOfCode Committed by GitHub
Browse files

Merge pull request #1154 from eip-ewi/fix-redacted-history-error-for-non-signed-in-user

parents cc992687 3a81b307
No related branches found
No related tags found
2 merge requests!51Upgrade to latest qpixel,!50Update to latest codidact changes
......@@ -16,7 +16,7 @@ class PostHistory < ApplicationRecord
# @param user [User]
# @return [Boolean] whether the given user is allowed to see the details of this history item
def allowed_to_see_details?(user)
!hidden || user.is_admin || user_id == user.id || post.user_id == user.id
!hidden || user&.is_admin || user_id == user&.id || post.user_id == user&.id
end
def self.method_missing(name, *args, **opts)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment